Laravel interview questions: what to expect in 2023
I’ve been in countless interviews over the last decade. Both as a candidate and a recruiter.
You will be fine if:
- You are knowledgeable enough on Laravel;
- Curious about the company;
- Have a good attitude (meaning that you’re not a know-it-all, unable to handle constructive criticism).
Depending on the job offer, there may be hundreds of applicants. Don’t be discouraged if you don’t get it. Apply to as many of them as possible.
Table of contents
- Understand why a company needs you
- Laravel interview questions
- What is the latest version of PHP?
- What is Composer?
- What is the latest version of Laravel?
- What are Service Providers and the container?
- What is a Facade?
- What is Lumen?
- Other requirements
- Work on your communication
- Set up a GitHub profile
- Set up a LinkedIn profile and use it as a resume
- Keep your skills sharp
- Conclusion

Understand why a company needs you
A company needs you because they want to keep their product evolving or work on new client projects.
They hire you to help them make more money, not to let you mindlessly write code all day.
They will make more money if you understand what a return on investment (ROI) is.
For instance, if you’re asked to work on a new feature, your job is to build it as quickly as possible. There are a few ways to succeed in this endeavor (in priority order):
- Use no-code tools. The best ones are paid, but most have a free trial. Ask your boss if they’re willing to pay first (or to offload the cost to the client if there’s one);
- Use open-source libraries. Those will help you deliver faster than if you tried to do everything yourself. Libraries are maintained by an army of developers and used by thousands.
Understand that minimal efforts for maximum profits is what any business is looking for. Don’t think your employer is some sandbox you can experiment in.
Laravel interview questions
What is the latest version of PHP?
When writing this article, the latest version of PHP is 8.2. I even wrote about PHP 8.3 already!
Knowing the latest PHP version before applying for a PHP job is mandatory.
You wouldn’t hire anybody that doesn’t have such basic knowledge. This would be a testimony to a cruel lack of curiosity. 😬
What is Composer?
Composer is a dependency manager for PHP.
This is the way to go if you need to use third-party code.
Composer wasn’t always there. It appeared in 2012 and completely changed how we develop apps in PHP.
What is the latest version of Laravel?
At the time I’m writing this article, Laravel 9 is the latest version.
In February, Laravel 10 will be released. If I don’t update this article in time, please consider this.
We both know how important it is to know what the latest version of Laravel is… in a Laravel interview. 😅
This question might sound stupid, but it’s a quick way to gauge an applicant’s curiosity.
What are Service Providers and the container?
A Service Provider is a class responsible for registering services in the container. The AppServiceProvider
class for instance.
The container, in simple terms, is like a magic box in which you store your services, that can retrieve and conveniently serve you whatever you need.
Let’s say we have a Client
class (aka service) that posts tweets on Twitter.
We can register it like so in app/Providers/AppServiceProvider.php:
use App\Twitter\Client; class AppServiceProvider extends ServiceProvider{ public function register() : void { $this->app->bind(Client::class, function () { return new Client(config('services.twitter.client_id')); }); }}
Then, in app/Http/Controllers/PostController.php, and a lot of places in our codebase, we can get the instance of Client
registered in our container by type hinting our controller method:
use App\Twitter\Client; class PostController extends Controller{ public function store(StorePostRequest $request, Client $client) : View { // Create the post. // Tweet about it. // Redirect the user. }}
Learn more about Laravel’s container.
What is a Facade?
A Facade is a proxy to a dependency registered in the container.
They provide a static interface, without reducing testability, unlike true static methods. They also facilitate dependency swapping at run time.
Some interviewers may think facades are bad because they’re just parroting what they read on the Internet. We all did that at some point, and that’s fine.
They shouldn’t disagree with the answer above, but let them know you won’t waste their time and respect any constraint the company will enforce (if they decide not to use them).
What is Lumen?
Lumen a microframework made at a time PHP still needed help to perform. It’s a lightweight version of Laravel mostly used for web APIs development.
Today, PHP and Laravel are fast enough for APIs. Especially when coupled with Octane.
This is why the Laravel team discourages people from using Lumen as it isn’t actively maintained anymore.
Other requirements
Work on your communication
Being able to express yourself clearly, orally and in writing, in your native language, is crucial for being taken seriously.
Your first words with your potential future employer will set the tone of your relationship. It would help if you made a good impression.
If you get the job, you’ll have to communicate with your colleagues, convey ideas in the most effective way possible, write comments in your code, documentation, etc.
My recommendation is to constantly work on your communication abilities. Listen to smart people talking and learn. Use tools to improve your writing, like your device’s autocorrect or Grammarly (which is free to use), and learn from them as well.
Set up a GitHub profile
I clearly stated in this article how important it is to hire developers with up-to-date knowledge.
GitHub is a fantastic tool used by everyone. It’s a hub that hosts Git repositories. You should know about it.
Open-source projects host and share their code on it for free, and many companies do the same privately.
- Set up your GitHub account;
- Learn how to use Git. Being able to do simple commits, switch branches, and push code to a remote repository (hence the need for GitHub) will make a difference;
- Make small contributions to open-source projects or showcase some of your code on your profile.
- Include it on your resume!
Take a look at the “Git Me Some Version Control” course on Laracasts.
Set up a LinkedIn profile and use it as a resume
LinkedIn is an excellent platform to look for a programming job. Chances are that even with little experience, recruiters will spontaneously contact you.
LinkedIn lets you add your work experience and various other informations about you, which anyone can see. You can even generate a PDF version of your profile, which some recruiters will ask for.
It also lists the latest job offers. You can apply to most of them from LinkedIn, which is convenient.
Keep your skills sharp
The world of programming is constantly changing.
New languages, frameworks, and tools show up all the time.
And existing ones are constantly updated and improved.
As a programmer, you must constantly learn and adapt to stay on top of the latest trends.
It’s challenging but rewarding, and the constant changes mean you won’t have time to be bored.
Conclusion
Do your best to be ready for your interview.
There’s no shortcut to being hired as a developer.
Also:
- Make sure to be as informed as possible about the company you’re applying to;
- Show your eagerness to learn.
- Have a good attitude.