Need Assistance?

support@tutorialshub.in

Controllers & MVC Architecture

Resource Controllers (Route::resource)

ADVERTISEMENT
Laravel Free Lesson
5 min read
ADVERTISEMENT

Most admin panels need the same 7 CRUD actions: index, create, store, show, edit, update, and destroy. Running php artisan make:controller PostController --resource generates all 7 methods, and Route::resource('posts', PostController::class) registers all 7 routes in a single line!

ADVERTISEMENT
Hi, I'm Tuby! Here to help you