Skip to main content

All Tutorials

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

Tutorial Free

How to Quickly Check PHP Version: CLI, NginX, Laravel

Sometimes you may see PHP version errors like "Your Composer dependencies require a PHP version" when running a Terminal command. Or get syntax errors like "unexpected '|', expecting variable (T_VARIABLE)" when you visit your site on the browser. One common issue between these two problems is the different PHP versions in the Terminal and on the website.

Tutorial Free

Laravel HasMany: Restrict Parent Delete to Avoid QueryException

If you have a `hasMany` relationship and want to restrict/prevent deleting the parent record if it has at least one child record, this tutorial will show you two ways: check if children exist or try-catch if Exception happens.

Tutorial Free

Livewire or Inertia? Let's Hear What Taylor Otwell Says

During the recent Laracon US event, Laravel creator Taylor Otwell announced many new things and summarized the Laravel ecosystem in 2023. Part of that was discussing the full-stack and front-end development tools. So here's what he had to say about Inertia VS Livewire.

Tutorial Free

Laravel: "Route not defined": Easiest Way to Fix

If you build links and call them by route names, you may get an error like "Route [register] not defined". But you could swear that the name is correct! I will show you the easiest way to debug and fix it.