Category: Laravel Interview Question
-
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.
-
Explain important directories used in a common Laravel application.
Directories used in a common Laravel application are:
-
What do you mean by bundles?
In Laravel, bundles are referred to as packages. These packages are used to increase the functionality of Laravel. A package can have views, configuration, migrations, routes, and tasks.
-
Why use Route?
Routes are stored inside files under the /routes folder inside the project’s root directory. By default, there are a few different files corresponding to the different “sides” of the application (“sides” comes from the hexagonal architecture methodology).
-
What is a Route?
A route is basically an endpoint specified by a URI (Uniform Resource Identifier). It acts as a pointer in Laravel application. Most commonly, a route simply points to a method on a controller and also dictates which HTTP methods are able to hit that URI.
-
Name aggregates methods of query builder.
Aggregates methods of query builder are: 1) max(), 2) min(), 3) sum(), 4) avg(), and 5) count().
-
What is HTTP middleware?
HTTP middleware is a technique for filtering HTTP requests. Laravel includes a middleware that checks whether application user is authenticated or not.
-
Define composer.
It is an application-level package manager for PHP. It provides a standard format for managing PHP software dependencies and libraries.
-
What is Laravel?
Laravel is an open-source widely used PHP framework. The platform was intended for the development of web application by using MVC architectural pattern. Laravel is released under the MIT license. Therefore, its source code is hosted on GitHub. It is a reliable PHP framework as it follows expressive and accurate language rules.