Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to create Creating a Controller ?

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


Please Help Members By Posting Answers For Below Questions

How do you do dependency injection in laravel?

749


Explain validation concept in laravel.

717


Name databases supported by laravel.

878


What is a service supplier?

666


State the difference between codeigniter and laravel.

797


How will you explain dd() function in laravel?

784


List out the databases laravel supports?

756


What do you mean by reverse routing in laravel 5?

780


Explain collections in laravel.

800


Tell me what are system requirement for laravel 5.0?

761


How to make a helper file in laravel?

718


What is views in laravel?

727


What is laravel horizon?

733


Define homebrew?

787


Explain how to configure cron jobs in homestead?

648