Author: tayyaba
-
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.
-
Explain dependency injection and their types.
It is a technique in which one object is dependent on another object. There are three types of dependency injection: 1) Constructor injection, 2) setter injection, and 3) interface injection.
-
Explain the concept of events in Laravel.
An event is an occurrence or action that help you to subscribe and listen for events that occur in Laravel application. Some of the events are fired automatically by Laravel when any activity occurs.