摘要:
一,相关文档 https://learnku.com/docs/laravel/10.x/blade/14852#918cb6 二,模板: resources/views/layouts/layout.blade.php 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 阅读全文
摘要:
一,相关文档: https://learnku.com/docs/laravel/10.x/eloquent-relationships/14889 二,php代码: 1,model中定义方法 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 阅读全文
摘要:
一,php代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 public function home(Request $request){ //默认连接 DB::enableQueryLog(); $modelNews = 阅读全文
摘要:
一,相关文档 https://learnku.com/docs/laravel/10.x/database/14882#2cd405 二,php代码 1,编辑.env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=gon 阅读全文
摘要:
一,相关文档 https://learnku.com/docs/laravel/10.x/middleware/14846 二,php代码 1,middleware 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 < 阅读全文
摘要:
一,相关文档: https://learnku.com/docs/laravel/10.x/http-tests/14896 二,php代码: 1,创建test程序 liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:test NewsTe 阅读全文
摘要:
一,相关文档: https://learnku.com/docs/laravel/10.x/blade/14852 二,创建controller和view 1,创建controller liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:c 阅读全文
摘要:
一,相关文档: https://learnku.com/docs/laravel/10.x/routing/14845 二,查看所有注册的路由 1,查看路由: liuhongdi@lhdpc:/data/laravel/dignews$ php artisan route:list GET|HEAD 阅读全文
摘要:
一,相关文档 https://learnku.com/docs/laravel/10.x/artisan/14859 二,php代码 1,创建command liuhongdi@lhdpc:/data/laravel/dignews$ php artisan make:command Cart IN 阅读全文
摘要:
一,相关文档: https://learnku.com/docs/laravel/10.x/providers/14843 二,php代码: 1,业务代码: App\extend\mall\GoodsInterface.php 1 2 3 4 5 6 7 <?php namespace App\ex 阅读全文