这种是mysql的密码不对,自己去代码的.env里面改
----------------------------------------------------_---------------------------------------------------------------------------
这种是mysql服务没有打开,可以点击此电脑,右键G,找到服务里面的Mysql,然后启动
也可以安ctrl+alt+delete,找到任务管理器,点击服务,然后启动mysql
-------------------------------------------------------------------------------------------------------------------------
创建文档后,点击www出现这种
出现这种情况,应该是创建的时候就有问题了
应该先检查这个里面有没有对应的项目名称,没有就手动添加.
---------------------------------------------------------------------------------——----------------------------------
could not find driver (SQL: select * from information_schema.tables where table_schema = Todos and table_name = migrations and table_type = 'BASE TABLE') at E:\laragon\www\Todos\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712 708▕ // If an exception occurs when attempting to run a query, we'll format the error 709▕ // message to include the bindings with SQL, which will make this exception a 710▕ // lot more helpful to the developer instead of just the database's errors. 711▕ catch (Exception $e) { ➜ 712▕ throw new QueryException( 713▕ $query, $this->prepareBindings($bindings), $e 714▕ ); 715▕ } 716▕ }
出现这个问题可就大了
解决办法:
自己快速创建一个项目,然后中途按ctrl+c终端,然后在这个终端就能用了,cd到你之前的目录,然后进行操作,小黑面板和largon自带的可能都不行
------------------------------------------------------------------------------------------------------------------------
如果出现这种问题,就是端口号被占用了,可以照这个详情链接操作
Service Apache can not start. Reason:(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一-次。: AH00072: make_ sock_好了,ap的博客-CSDN博客
-----------------------------------___----------------------------------------------------------------------------------
Illuminate\Contracts\Container\BindingResolutionException
Target class [DogController] does not exist.
这种一般是没有use控制器,在你web.php里面的前面看看有没有这个
一些常用的命令
php artisan make:controller AboutController php artisan make:model Todo php artisan make:migration create_todos_table//里面是表的结构 php artisan make:factory TodoFactory -m Todo//生成一个填充规则 php artisan make:seeder Toseeder//创建一个填充类 php artisan migrate:refresh//添加字段 php artisan db:seed//填充字段 migrate:refresh php artisan make:model -csfm//一步创建成功
------------------------------------------------------------------------------------------------------------------------
如果没有样式,可能是引入在线的bootrstrap失效了,可参考:
样式没有了,怎么办???
------------------------------------------------------------------------------------------------------------------------
Class 'App\Http\Controllers\Todo' not found
------------------------------------------------------------------------------------------------------------------------
Warning: require(E:\laragon\www\Hifone-1.0\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in E:\laragon\www\Hifone-1.0\bootstrap\autoload.php on line 28
Fatal error: require(): Failed opening required 'E:\laragon\www\Hifone-1.0\bootstrap/../vendor/autoload.php' (include_path='.;E:/laragon/etc/php/pear') in E:\laragon\www\Hifone-1.0\bootstrap\autoload.php on line 28
解决:
1.cd 到该引用的根目录,删除 composer.lock 文件;
2.重新在根目录执行 composer install