Skip to main content

All Tutorials

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

Tutorial Free

PhpStorm: easily create new Laravel project

Today I want to tell about another "trick" - or how to create a Laravel project without Command line or Terminal, directly from PhpStorm.

Tutorial Free

Did you know about havingRaw() function?

Eloquent and Query Builder have a lot of "hidden gems" which are not in the official docs. For example, if you want to perform GROUP BY and HAVING, there's a little trick for unnamed columns.

Tutorial Free

Echoing: dd() vs var_dump() vs print_r()

One of the most popular way of debugging in PHP still remains the same - showing variables in the browser, with hope to find what the error is. Laravel has a specific short helper function for showing variables - dd() - stands for "Dump and Die", but it's not always convenient. What are other options?

Tutorial Free

Seeding - inside of the migration files

Laravel has quite a convenient mechanism of dealing with database changes. It consists of Migration files for database structure and Seed files for sample data. But why separate them if sometimes it make sense to add it all to one file?

Tutorial Free

Override updated_at, or "hidden" save() parameters

Another interesting feature in Laravel Eloquent mechanism. When updating existing entry, we just use update() or save() and then updated_at field is changed automatically. But what if we want to stick our own updated_at instead of automatic one?

Tutorial Free

How to check route parameters with regular expressions

I'm pretty sure that majority of you haven't read ALL official Laravel documentation - you work only with functions you actually need and know, right? So I like to dig up some less known or "hidden" features which are new to many people. So today one of those "Did you know?" cases.

Tutorial Free

In Eloquent We Trust, or don't assume find() always finds something

This short lesson will be both about Laravel and about general software development. One of the most often and common mistakes made by developers is not checking input data. And then not only you get random errors of something "not found", but sometimes much worse - expose your system to vulnerabilities and attacks. So let's discuss that with examples from Eloquent world.

Tutorial Free

How to get rid of /home URL for authentication?

This time - a really short tip. In default Laravel Auth functionality there are some predefined values, settings and similar stuff - one of them is redirecting to /home URL after successful login, or if a user is already logged in. What if we don't have that /home - what if in our case it's different?

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.