laravel学习中遇到的问题1

1/php artisan make:migration create_articles_table


报错信息

新建表的时候报错
报错信息是The Process class relies on proc_open, which is not available on your PHP installation.
决绝方法 找到php.ini 搜索proc_open 发现是被禁用的。。删掉这一个 保存 ok 问题解决

2/Parse error: syntax error, unexpected '=' in E:\www\laravel\vendor\laravel\framework\src\Illuminate\Support\Arr.php on line 388
原因 php版本过低 调到php7以上

3/
1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp
ecified key was too long; max key length is 1000 bytes")
E:\www\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458

2 PDOStatement::execute()
E:\www\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458
解决方法修改config下的database 里面的charset 和collation
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
],

4、php artisan没有创建view的方法咋办
image.png

解决方法先安装一下 composer require sven/artisan-view


laravel学习中遇到的问题1_第1张图片
image.png

image.png

现在就可以创建了 命令为php artisan make:view Admin/Index/index
laravel学习中遇到的问题1_第2张图片
image.png

你可能感兴趣的:(laravel学习中遇到的问题1)