Answer Posted / sunil kumar
Open the terminal based on the operating system you are using and type the following command to create controller using the Artisan CLI (Command Line Interface).
Syntax : Route::get(‘base URI’,’controller@method’);
Example : php artisan make:controller <controller-name> --plain
It describes above example Replace the <controller-name> with the name of your controller.
This will create a plain constructor as we are passing the argument — plain.
If you don’t want to create a plain constructor, you can simply ignore the argument.
The created constructor can be seen at app/Http/Controllers.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you do dependency injection in laravel?
Explain validation concept in laravel.
Name databases supported by laravel.
What is a service supplier?
State the difference between codeigniter and laravel.
How will you explain dd() function in laravel?
List out the databases laravel supports?
What do you mean by reverse routing in laravel 5?
Explain collections in laravel.
Tell me what are system requirement for laravel 5.0?
How to make a helper file in laravel?
What is views in laravel?
What is laravel horizon?
Define homebrew?
Explain how to configure cron jobs in homestead?