Resource在设置路由控制器上比较便捷,虽然失去了一些自由度,选择与否根据具体情况而定.
路由:

控制器:
默认生成的public方法有:
index(),create(),store(),show(),edit(),update(),destroy()

命令:

php artisan make:controller xxxxx/xxxxx --resource --model=xxxx\/xxxx/\xxxx
Resource在设置路由控制器上比较便捷,虽然失去了一些自由度,选择与否根据具体情况而定.
默认生成的public方法有:
index(),create(),store(),show(),edit(),update(),destroy()
命令:
php artisan make:controller xxxxx/xxxxx --resource --model=xxxx\/xxxx/\xxxx
本文标题:Hash式备忘录之laravel,resource生成命令
本文链接:https://www.haomeiwen.com/subject/lejekxtx.html
网友评论