上一页 1 ··· 100 101 102 103 104 105 106 107 108 ··· 179 下一页
摘要: 一,php代码 修改routes/web.php 原代码: Route::get('/', function () { return view('welcome'); }); 修改后 Route::get('/', function () { $appName = env('APP_NAME'); 阅读全文
posted @ 2023-10-21 08:50 刘宏缔的架构森林 阅读(76) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/redis/14887 二,php代码 1,配置.env 使用默认的设置: REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 2,control 阅读全文
posted @ 2023-10-21 08:48 刘宏缔的架构森林 阅读(45) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/queries/14883 二,php代码: 1,配置.env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=gonews DB 阅读全文
posted @ 2023-10-20 08:01 刘宏缔的架构森林 阅读(42) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/validation/14856 二,php代码 1,生成类 liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:request HomeReque 阅读全文
posted @ 2023-10-20 07:58 刘宏缔的架构森林 阅读(100) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/logging/14858 二,未配置日志: php代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <?php namespace App\Http\Controller 阅读全文
posted @ 2023-10-20 07:55 刘宏缔的架构森林 阅读(165) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/middleware/14846 二,创建middleware liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:middleware Check 阅读全文
posted @ 2023-10-20 07:53 刘宏缔的架构森林 阅读(162) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/middleware/14846 二,创建middleware liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:middleware Check 阅读全文
posted @ 2023-10-20 07:49 刘宏缔的架构森林 阅读(150) 评论(0) 推荐(0)
摘要: 一,创建exception: liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:exception ApiException INFO Exception [app/Exceptions/ApiException.php] created 阅读全文
posted @ 2023-10-19 09:07 刘宏缔的架构森林 阅读(128) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/errors/14857#87364d 二,php代码: 1,app\exceptions\Handler.php 增加以下一段: 1 2 3 4 5 6 7 8 9 10 11 //重写render pub 阅读全文
posted @ 2023-10-19 08:55 刘宏缔的架构森林 阅读(125) 评论(0) 推荐(0)
摘要: 一,相关文档: https://learnku.com/docs/laravel/10.x/routing/14845#ad9737 二,php代码 在routes/web.php中添加以下代码: 1 2 3 4 5 6 7 8 //配置回退路由,起兜底作用 Route::fallback(func 阅读全文
posted @ 2023-10-19 08:53 刘宏缔的架构森林 阅读(56) 评论(0) 推荐(0)
上一页 1 ··· 100 101 102 103 104 105 106 107 108 ··· 179 下一页