Author: tayyaba
-
How can you enable query log in Laravel?
You can use enableQueryLog method to enable query log in Laravel.
-
What is service container in Laravel?
Service container is a tool used for performing dependency injection in Laravel.
-
List default packages of Laravel 5.6.
Default packages of Laravel 5.6 are: 1) Envoy, 2) Passport, 3) Socialite, 4) Cashier, 5) Horizon, and 6) Scout.
-
State the difference between get and post method.
Get method allows you to send a limited amount of data in the header. Post allows you to send a large amount of data in the body.
-
Where will you define Laravel’s Facades?
All facades of Laravel have defined in Illuminate\Support\Facades namespace.
-
How will you register service providers?
You can register service providers in the config/app.php configuration file that contains an array where you can mention the service provider class name.
-
Explain the concept of contracts in Laravel.
They are set of interfaces of Laravel framework. These contracts provide core services. Contracts defined in Laravel include corresponding implementation of framework.
-
Explain traits in Laravel.
Laravel traits are a group of functions that you include within another class. A trait is like an abstract class. You cannot instantiate directly, but its methods can be used in concreate class.
-
Explain reverse routing in Laravel.
Reverse routing is a method of generating URL based on symbol or name. It makes your Laravel application flexible.
-
What is a Controller?
A controller is the “C” in the “MVC” (Model-View-Controller) architecture, which is what Laravel is based on.