Questions tagged «laravel-5.4»

30
Laravel迁移错误:语法错误或访问冲突:1071指定的密钥太长;最大密钥长度为767字节
Laravel 5.4上的迁移错误 php artisan make:auth [Illuminate \ Database \ QueryException] SQLSTATE [42000]:语法错误或访问冲突:1071指定的密钥太长;默认值为0。最大密钥长度为767字节(SQL:更改表users添加唯一users_email_unique(email)) [PDOException] SQLSTATE [42000]:语法错误或访问冲突:1071指定的密钥太长;默认值为0。最大密钥长度为767字节

5
PHP7:安装ext-dom问题
我在使用PHP7的Ubuntu 16.04服务器上运行laravel 5.4。尝试安装cviebrock/eloquent-sluggable软件包会引发一些错误: pish@let:/home/sherk/ftp/www$ sudo composer require cviebrock/eloquent-sluggable Do not run Composer as root/super user! See https://getcomposer.org/root for details Using version ^4.2 for cviebrock/eloquent-sluggable ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. …


5
如何在Laravel中验证数组?
我尝试在Laravel中验证数组POST: $validator = Validator::make($request->all(), [ "name.*" => 'required|distinct|min:3', "amount.*" => 'required|integer|min:1', "description.*" => "required|string" ]); 我发送空的POST,并将其if ($validator->fails()) {}作为False。这意味着验证是正确的,但事实并非如此。 如何在Laravel中验证数组?当我提交表格时input name="name[]"
104 php  laravel  laravel-5.4 

21
Laravel 5.4特定表迁移
嗨,您可以在https://laravel.com/docs/5.4/migrations中阅读所有包含的文档。 有没有一种方法来迁移特定的迁移文件(仅1个迁移),导致在我每次使用更改php artisan migrate:refresh并且所有字段都被重置时立即导致。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.