In this blog post I am going to mention some Laravel Interview Questions that I usually ask to check if candidate really knows about Laravel or not. If you are a job seeker, it will help you in preparing for interview. If you are an employer it will help you in evaluating candidate.
Question 1 : Since when you have been working with Laravel?
For Employer : It’s very important to ask this question as it will help you in knowing exact experience of candidate. It’s possible that candidate have worked in it past and recently is not working on it.
For Job Seeker : Give answer in exact number of months and years. Do not bluff about it as smart employer will catch you easily. For example if you say you have three years of experience then they will ask you about difference in versions.
Question 2 : Which Laravel version have you used recently?
For Employer : This will help you in knowing if candidate has worked on recent version or not. Many candidates do not check for updates. So if current version is 5.4 and candidate said to use 5.0 or older version that means he /she is not updating their skills. Not so good candidate in my opinion.
For Job Seeker : Keep in mind about latest version you have used and tell employer about it. Also keep in mind about latest version . If they ask that current version is 5.4 and why are you still using 4.2. You should give them genuine reasons. Don’t say I will learn new version if you hire me.
Question 3 : Why do you prefer Laravel?
For Employer : If candidate says, it’s easy to use, you should not prefer that candidate. Because frameworks are created to make development easy so it’s always easy to use. If candidate has really evaluated it, they should explain about the core features of Laravel like,
- Simple MVC that can be extended easily
- Clean and secure routing
- Powerful Eloquent ORM for database
- Migrations
- Third party plugins etc.
For Job Seeker : Do not say it’s easy to use. By asking this question employers want to evaluate your learning skills. How deep you can go in subject. In stead of just saying, it’s easy to use, you should explain why it is easy to use and explain some of the core features of framework mentioned above.
Question 4 : Explain role of Composer?
For Employer : If candidate explains exact role of composer like, composer is a dependency management tool, used to create and update project. With composer you can update Laravel versions, install and update third party plugins. How to manage dependencies with composer.json file etc. Then he knows about it. If they just say it’s dependency management tool, you should not select candidate.
For Job Seeker : As I explained above, you should mention complete role of composer. Including composer commands and use of composer.json file. Give some examples of commands like composer update and require and explain them in brief.
Question 5 : What are artisan commands
For Employer : Artisan commands are used to create files and classes like controllers, models, migrations etc. If candidate explain like this and give some examples of commands like php artisan make:migration php artisan serve etc. It means they know which command to use and when.
For Job Seeker : Here you should explain about artisan commands with example and give brief information about it. Do not give each and every example of command. Name few and give exact use of command.
Question 6: What are the migrations?
For Employer : As laravel is web application an for it database is important and for this migrations are used. If candidate says I don’t know about it or never used it, then you should avoid that candidate as knowledge of migrations is necessary. Particularly when you are working in team.
For Job Seeker : Explain from start. How to create migration. Use of up and down function in class. How to create and alter table schema with migration. How to run reset and rollback migration.
Question 7: Explain MVC in Laravel?
For Employer : MVC is design pattern used in Laravel so it’s important to ask this question. Ideal candidate should explain him from start to end.
For Job Seeker : Explain from start. How to specify routes, how to create views and return from controller and how you use model for database operations. Explain each component with example for good impact.
Question 8: Explain project directory structure?
For Employer : For every framework it’s good to know about files and folder structure. A good and curious should have explored completely and should be able to answer this question easily.
For Job Seeker : Explain content of directories like app, public, config, vendor etc. Explain role of each directory. This will make a good impact on employer that you are very curious and have good debugging skills.
Please note these questions are to evaluate if candidate really knows about Laravel or not. I will publish another blog for technical questions.