How to Test Junior Laravel Developer Skills: Sample Project

While expanding my team and working with potential junior developers, I’ve come up with a few tasks to test their practical knowledge. There’s not much value in quizzes or interviews – let them create one simple project. From start to finish. So here’s an example of such project, you can use it for your own needs.

We need to test basic Laravel skills, right? So the project should be simple, but at the same time touch majority of fundamentals. Also, it should be possible to do within a day or so – in some cases, you would even pay them for spending their time.

With that in mind, here’s a project I came up with.

Adminpanel to manage companies

Basically, project to manage companies and their employees. Mini-CRM.

  • Basic Laravel Auth: ability to log in as administrator
  • Use database seeds to create first user with email admin@admin.com and password “password”
  • CRUD functionality (Create / Read / Update / Delete) for two menu items: Companies and Employees.
  • Companies DB table consists of these fields: Name (required), email, logo (minimum 100×100), website
  • Employees DB table consists of these fields: First name (required), last name (required), Company (foreign key to Companies), email, phone
  • Use database migrations to create those schemas above
  • Store companies logos in storage/app/public folder and make them accessible from public
  • Use basic Laravel resource controllers with default methods – index, create, store etc.
  • Use Laravel’s validation function, using Request classes
  • Use Laravel’s pagination for showing Companies/Employees list, 10 entries per page
  • Use Laravel make:auth as default Bootstrap-based design theme, but remove ability to register

company-crud

Basically, that’s it. With this simple exercise junior developer shows the skills in basic Laravel things:

  • MVC
  • Auth
  • CRUD and Resource Controllers
  • Eloquent and Relationships
  • Database migrations and seeds
  • Form Validation and Requests
  • File management
  • Basic Bootstrap front-end
  • Pagination

Guess what – most of the basics web-applications will have these functions as core. There will be a lot more on top of that, but without these fundamentals you cannot move further.

So this task would actually test if the person can create simple projects. And then it’s practice, practice, practice on more projects, each of them individual and adding more to their knowledge base.

From my own experience, different developers are “creative” in different code places – some don’t use Resource controllers and put Route::get everywhere, some don’t validate forms, some don’t test their code properly etc. That’s exactly the things you want to spot as early as possible.


Extra Task for “Advanced” Juniors

If you feel like this task is too small and simple, you can add these things on top:

  • Use Datatables.net library to show table – with our without server-side rendering
  • Use more complicated front-end theme like AdminLTE
  • Email notification: send email whenever new company is entered (use Mailgun or Mailtrap)
  • Make the project multi-language (using resources/lang folder)
  • Basic testing with phpunit (I know some would argue it should be the basics, but I disagree)

Do you agree with such task? What would you change or add to this?
And have you had any experience with giving similar tasks, what were your impressions?

Want to generate Laravel adminpanel online?
You don't need any packages to do that!

20 thoughts on “How to Test Junior Laravel Developer Skills: Sample Project

  1. Sounds about right. I would perhaps add using the Faker library to create dummy data to the first set. Unless you really want them to enter 10 records to test the pagination system 😀

  2. Hi,

    Very well written article. This sounds good to me. I was in discussion with my team and other fellow colleagues of mine to find a solution for the same. Being a technical recruiter this might help me. Thanks a lot.

  3. Thanks, Povilas,
    Having just started @ 61 years old, I can now consider myself just above a ‘Junior Laravel Programmer’…..Cheers…
    I was wondering where I stood.
    Love yours and the public work of many others.
    Thanks for all your help.

  4. Hi!

    We have been using this kind of activity with our interns and also with employee candidates for the last 3 years. Also We recommend the laracasts fundamentals or laravel from scratch series, to give an idea of what’s the way to work: conventions, naming, directory structure.

    It’s rare to see a buddy not using git. But also we encourage to manage this little project in git to see how he commit, comments and descriptions, also we add Toggl as a timing tool to have a little idea of how he manage his time.

    Also a point is to not use 3rd party packages in this project. Well, laravelcollective/html it’s allowed and also guzzle but another package to solve the problem with files or another stuff is prohibited so We can see the way that he solve the problem by himself.

    Greetings!

    1. I forgot to say that this is a really good task, has given us good results to have a qualified team.

      We encourage to write a readme.md with a description of the project, how to install it and run it from background to up. So the day that it’s finished, every revisor can clone the project and install it.

  5. Hey Povilas,

    I’ve been following your blog for about a year (almost since the day I discovered Laravel). Thank you for posting this, as I’ve never really had an idea where I stood.

    If anyone reading this would mind taking a look at how I did here https://github.com/nexxai/laraveldaily-minicrm with the understanding that it took me about 1.5 or 2 hours and I only had to look at the Laravel documentation for the filesystem stuff since I really haven’t done much with that before now, would you tell me what you think of my code?

    I tried to keep things simple, and I think it’s basically functional, but I don’t know if there are better ways to do things.

    1. Hi Nexxai,
      Great job, these are the things I’ve found:

      1. Didn’t notice the Login window and Middleware for that – CRUDs are available in public?

      2. Route::resource(‘/company’,
      – I would do “companies”, not singular. But that’s personal preference.

      3. Examples:
      public function create()
      {
      $company = new Company();
      return view(‘company.create’)->with([‘company’ => $company]);
      }

      $employee = new Employee();
      return view(’employee.create’)->with([‘companies’ => $companies, ’employee’ => $employee]);

      >>> Why do you need new Company() or new Employee() in create()? You’re not using it anywhere.

      4. Update:
      if ($request->logo) {
      $company->logo = $request->logo;
      }
      >>> So you’re not uploading the file on upload?

      5. Delete button – there should be confirmation modal “Are you sure?”

      6. You didn’t use Request classes for validation. It still works with $this->validate, but original task mentioned Requests.

      7.
      $employee = new Employee();
      $employee->first_name = $request->first_name;
      $employee->last_name = $request->last_name;
      $employee->company_id = $request->company_id;
      if ($request->email) {
      $employee->email = $request->email;
      }
      if ($request->phone_number) {
      $employee->phone_number = $request->phone_number;
      }
      $employee->save();

      >>> Much quicker:
      Employee::create($request->all());

      Hope that helps!

      1. Wow, thank you for responding so quickly!

        I’ll respond in order to your comments.

        1. Whoops, that was my bad. I know they need to be surrounded by the Auth middleware.
        2. Fair enough; I just prefer the singular but if I was told specifically to do it plural, I would.
        3. I think I got in that habit when I was playing around with one of the form builder composer packages. I’ve removed those bits.
        4. I’m not sure I understand this question
        5. I’m still working on this. JavaScript is definitely not my strong suit, so I’m still trying to figure this one out that doesn’t involve a separate entire modal section in every @foreach item
        6. I didn’t even know these were a thing until you said this; I’d never heard of them. I did some research and now I think I’ve done them correctly?
        7. I’m having issues with this too, specifically on the Employee model, as it says

        SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: employees.company_id (SQL: insert into “employees” (“first_name”, “last_name”, “email”, “phone_number”, “updated_at”, “created_at”) values (Test, User, test.user@test.ca, , 2018-02-24 06:42:07, 2018-02-24 06:42:07))

        when trying to store the record. It looks like it thinks the “company_id” value is missing, but it’s definitely not. The Company model updates with $request->all() no problem but I can’t figure out what’s wrong with the Employee one.

        I pushed the updated code to GitHub if you have a second to look. If not, I totally understand and I’ll keep trying to figure out what’s going on.

        1. 4. I meant that you’re updating $company but not actually uploading file.
          7. Probably ‘company_id’ is missing from $fillables in module.

          Sorry don’t have more time to analyze, well done though.

  6. Hi Povilas,

    I ‘following your blog for and Thank you for posting this,I hope you will accept this simple work

    If anyone reading this would mind taking a look at how I did here and not forget stars jut for motivation.
    https://github.com/MehdiElMellali/MINI-CRM

    I tried to keep things simple, and I think it’s basically functional and Extra Task for “Advanced” Juniors.

Leave a Reply

Your email address will not be published. Required fields are marked *