Skip to main content

All Tutorials

In-depth Laravel tutorials covering advanced topics, real-world examples, and best practices.

Tutorial Free

Laravel Two-Step Registration: Optional Fields for Country and Bio

Nowadays, we have a lot of Laravel tutorial about some syntax or package, but I think there's not enough written with real-life mini-projects, close to real demands of the clients. So will try to write more of these, and this is one of them: imagine a project where you need to have two-step registration process, with some optional fields in the second step. Let's build it in Laravel.

Tutorial Free

Laravel: Login and Register forms on the same page

Quite often, especially in e-shop projects, you can see a page to login or register before finishing the purchase. But Laravel has these two routes as separate login and register pages. So how to merge them together and avoid conflicts?

Tutorial Free

How to Structure Routes in Large Laravel Projects?

Imagine a Laravel project with 100+ routes, separate section for guest, users, administrators etc. Do you really want to keep it all in one file? How can you group them, add prefixes to URLs? Let's see what options we have.

Tutorial Free

New Course: Laravel PHPUnit Testing for Beginners

I want to invite you to my new online-course for those who always wanted to start automated testing with PHPUnit, but "never had time". In this short 90-minutes course, I will give you practical examples and show you that it's really easy to get started with testing.

Tutorial Free

40 Additional Laravel Validation Rules

Laravel Validation system has 60+ validation rules available, but what if you want something extra? You can easily create your own validation rule, or use something already available on the internet. Let's take a look.

Tutorial Free

Laravel API 404 Response: Return JSON Instead of Webpage Error

If you're building a Laravel project with both Web and API sides, you need to customize error messages for each of them separately. In web-view there should be error pages, and API exceptions should return JSON with status codes. How to handle it? I will show you an example with case of Model Not Found 404.

Tutorial Free

"Posts Per Page": How to Save Setting for Every User Individually

In typical project with list and pagination, you should have a choice to select, how many entries you want to see per page - 10, 25, 50, 100 etc. That setting probably refreshes the table or the whole page, but how to save it for the next time that user logs in, or visits the page in a week?

Tutorial Free

Taylor Otwell: "Thin" Controllers, "Fat" Models Approach

I was listening to recent podcast by Taylor Otwell, Laravel Snippet episode 11, where he touched on the debate in Laravel community on where you should put your code logic - in Controllers, Models, or Services. Here's what he said.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.