filmov
tv
Crack interview | Top Laravel Questions and Answers for developer - part 1
Показать описание
1. 1:14 - What is the latest Laravel version?
The latest Laravel version is 8.x.
2. 1:26 - Define Composer.
Composer is the package manager for the framework. It helps in adding new packages from the huge community into your laravel application.
For example, one of the most used packages for authentication will be Passport, for including that into your project, you can run the below command on your terminal:
composer requires laravel/passport
3. 3:42 - What is the templating engine used in Laravel?
4. 4:17 - What are available databases supported by Laravel?
The supported databases in laravel are:
PostgreSQL
SQL Server
SQLite
MySQL
5. 4:38 - What is an artisan?
Artisan is the command-line tool for Laravel to help the developer build the application. You can enter the below command to get all the available commands:
PHP artisan list: Artisan command can help in creating the files using the make command. Some of the useful make commands are listed below:
php artisan make:controller - Make Controller file
php artisan make:model - Make a Model file
php artisan make:migration - Make Migration file
php artisan make:seeder - Make Seeder file
php artisan make:factory - Make Factory file
php artisan make:policy - Make Policy file
php artisan make:command - Make a new artisan command
6. 6:27 - How to define environment variables in Laravel?
Some of the examples of environment variables are APP_ENV, DB_HOST, DB_PORT, etc.
7. 7:24 - Can we use Laravel for Full Stack Development (Frontend + Backend)?
Hence, Laravel can be used to make full-stack applications or just the backend APIs only.
8. 9:08 - How to put Laravel applications in maintenance mode?
Maintenance mode is used to put a maintenance page to customers and under the hood, we can do software updates, bug fixes, etc. Laravel applications can be put into maintenance mode using the below command:
php artisan down
And can put the application again on live using the below command:
php artisan up
Also, it is possible to access the website in maintenance mode by whitelisting particular IPs.
9. 10:35 - What are the default route files in Laravel?
Below are the four default route files in the routes folder in Laravel:
10. 12:51 - What are migrations in Laravel?
In simple, Migrations are used to create database schemas in Laravel. In migration files, we store which table to create, update or delete.
Each migration file is stored with its timestamp of creation to keep track of the order in which it was created. As migrations go up with your code in GitHub, GitLab, etc, whenever anyone clones your project they can run `PHP artisan migrate` to run those migrations to create the database in their environment. A normal migration file looks like below:
11. 16:50 - What are seeders in Laravel?
Seeders in Laravel are used to put data in the database tables automatically. After running migrations to create the tables, we can run `php artisan db:seed` to run the seeder to populate the database tables.
Reference on resource:
SUBSCRIBE TO CHANNEL:
Don't forget pls to click on 'Like', its giving additional motivation to work on channel.
Thank you for watching, for subscription and see you soon.
#laravel #mlaautomation #interview #questions #answers #developer #programmer
The latest Laravel version is 8.x.
2. 1:26 - Define Composer.
Composer is the package manager for the framework. It helps in adding new packages from the huge community into your laravel application.
For example, one of the most used packages for authentication will be Passport, for including that into your project, you can run the below command on your terminal:
composer requires laravel/passport
3. 3:42 - What is the templating engine used in Laravel?
4. 4:17 - What are available databases supported by Laravel?
The supported databases in laravel are:
PostgreSQL
SQL Server
SQLite
MySQL
5. 4:38 - What is an artisan?
Artisan is the command-line tool for Laravel to help the developer build the application. You can enter the below command to get all the available commands:
PHP artisan list: Artisan command can help in creating the files using the make command. Some of the useful make commands are listed below:
php artisan make:controller - Make Controller file
php artisan make:model - Make a Model file
php artisan make:migration - Make Migration file
php artisan make:seeder - Make Seeder file
php artisan make:factory - Make Factory file
php artisan make:policy - Make Policy file
php artisan make:command - Make a new artisan command
6. 6:27 - How to define environment variables in Laravel?
Some of the examples of environment variables are APP_ENV, DB_HOST, DB_PORT, etc.
7. 7:24 - Can we use Laravel for Full Stack Development (Frontend + Backend)?
Hence, Laravel can be used to make full-stack applications or just the backend APIs only.
8. 9:08 - How to put Laravel applications in maintenance mode?
Maintenance mode is used to put a maintenance page to customers and under the hood, we can do software updates, bug fixes, etc. Laravel applications can be put into maintenance mode using the below command:
php artisan down
And can put the application again on live using the below command:
php artisan up
Also, it is possible to access the website in maintenance mode by whitelisting particular IPs.
9. 10:35 - What are the default route files in Laravel?
Below are the four default route files in the routes folder in Laravel:
10. 12:51 - What are migrations in Laravel?
In simple, Migrations are used to create database schemas in Laravel. In migration files, we store which table to create, update or delete.
Each migration file is stored with its timestamp of creation to keep track of the order in which it was created. As migrations go up with your code in GitHub, GitLab, etc, whenever anyone clones your project they can run `PHP artisan migrate` to run those migrations to create the database in their environment. A normal migration file looks like below:
11. 16:50 - What are seeders in Laravel?
Seeders in Laravel are used to put data in the database tables automatically. After running migrations to create the tables, we can run `php artisan db:seed` to run the seeder to populate the database tables.
Reference on resource:
SUBSCRIBE TO CHANNEL:
Don't forget pls to click on 'Like', its giving additional motivation to work on channel.
Thank you for watching, for subscription and see you soon.
#laravel #mlaautomation #interview #questions #answers #developer #programmer