How to create a Controller and Resource Controller in Laravel 8

In this tutorials, you will be learning that how to create a controller in Laravel 8.

Before starting to create model and migration in laravel you need to create a new laravel project

Controller: Let's begin with creating a Controller named StudentController by the following command:

$ php artisan make:controller StudentController

After successful creation of this above command, you will find this controller in the following path as: app/Http/Controller/StudentController  

Resource Controller: 

This resource controller means, it will automatically create all the functions inside your controller of basic required things, which is total 7 functions created in this resource controller.

Lets create a resource controller by the following command:

$ php artisan make:controller StudentController --resource

© Copyright - 2018 - 2021 | All rights reserved at Funda of Web IT