Category: Laravel Interview Question
-
Explain PHP artisan
An artisan is a command-line tool of Laravel. It provides commands that help you to build Laravel application without any hassle.
-
Define Lumen
Lumen is a micro-framework. It is a smaller, and faster, version of a building Laravel based services, and REST API’s.
-
Why are migrations important?
Migrations are important because it allows you to share application by maintaining database consistency. Without migration, it is difficult to share any Laravel application. It also allows you to sync database. RELATED ARTICLES
-
Name the Template Engine utilized by Laravel.
Blade is a powerful template engine utilized by Laravel.
-
List available types of relationships in Laravel Eloquent.
Types of relationship in Laravel Eloquent are: 1) One To One 2) One To Many 3) Many To Many 4) Has Many Through, and 5) Polymorphic Relations.
-
How can you reduce memory usage in Laravel?
While processing a large amount of data, you can use the cursor method in order to reduce memory usage.
-
Explain validation concept in Laravel.
Validations are an important concept while designing any Laravel application. It ensures that the data is always in an expected format before it stores into the database. Laravel provides many ways to validate your data. Base controller trait uses a ValidatesRequests class which provides a useful method to validate requests coming from the client machine.