I've created Payment package for my laravel project
I want to make migration files inside migrations folder of my package. How can create it using artisan command? I want something like
php artisan make:migration packages/Payment/src/Database/add_orderId_to_cart_payment_table
Run Code Online (Sandbox Code Playgroud) 我正在尝试配置 nginx 以在同一域上为 laravel 和 yii 项目提供服务。我的 Laravel 项目运行良好。Yii 项目也可以工作,但 yii 项目上的资产文件夹给出err_aborted not found 404。所有 js css ... 文件未找到
server {
server_name mydomain.com;
index index.html index.php;
charset utf-8;
set $base_root /var/www;
# App 1 (main app)
location / {
root $base_root/telemele/public;
try_files $uri $uri/ /index.php?$query_string;
error_log /var/log/nginx/telemele.notice.log notice;
error_log /var/log/nginx/telemele.error.log error;
location ~* ^/index\.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/telemele/public/index.php;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}
# …
Run Code Online (Sandbox Code Playgroud) 为什么 Laravel 抛出
InvalidArgumentException('The values under comparison must be of the same type');
例外,当在规则上输入非数字文本(如“test”)时:
public function rules()
{
return [
'account_no' => 'required|numeric|gte:1'
];
}
Run Code Online (Sandbox Code Playgroud)
当预期只是不通过验证并显示消息时:
account_no field must be numeric
如何解决这个异常?