DEV Community

Osman Forhad
Osman Forhad

Posted on

how to generate view and controller in Laravel

recently I was working with a Laravel project for this purpose I need to generate view and controller through the command
so, what I was done for that I want to share with you few about it.
For Generate the views: I was run below command in my terminal
php artisan crud:view permissions --fields="name#string" --view-path="pages" --route-group=admin --form-helper=html --validations="name#required"

For Generate the controller: I was run below command in my terminal
php artisan crud:controller PermissionsController --crud-name=permissions --model-name=Permission --model-namespace="Spatie\Permission\Models\" --view-path="pages" --route-group=admin
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developerđź’»

Top comments (0)