Skip to main content

All Tutorials

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

Tutorial Free

7 Less-known but Useful Carbon functions

We all use Carbon library to manage date and time, right? But who has actually read full documentation of what functions it has? In addition to well-known ones like now() or format(), Carbon has a lot more useful stuff. Let's take a look.

Tutorial Free

Checklist: 8 Things to Do When Launching Laravel Project LIVE

After having launched a couple dozens of projects with Laravel, I decided to create a checklist for the launches. The problem is quite often something is forgotten or overlooked - either from our team side, or from the client. So this checklist should prevent it and possibly would help you in your launches too.

Tutorial Free

Did you know about Forelse loop in Blade?

As a tradition of posting little things here on the blog, one more useful detail. What do you do when you need to show a loop in Blade with foreach, but the list might be empty? You probably write if-else statement around it, right?

Tutorial Free

Route parameters - no hyphen, only underscore

Lately I've been re-reading full Laravel documentation and found quite a lot of "small details" which no one actually noticed in tutorials or books. One of these is using "-" symbol in route parameters.

Tutorial Free

Two ways to set default DB column values in Laravel

Sometimes there is a need to set a default column value for database field - if it's not provided when creating the entry. There are two simple ways of doing it.

Tutorial Free

Routes file: redirect "everything else" to homepage

We all know that file app/Http/routes.php is used for listing all possible routes we need for our application. But what if we need to define a rule for "everything else"? Like, we have a list of our routes, and if the URL doesn't match any of those rules - we want to, for example, redirect to homepage instead of showing 404 error.

Tutorial Free

Laravel log - single file or files by date?

Laravel logging mechanism is pretty simple - it writes all the errors to a file at /storage/logs/laravel.log. It's convenient until the file gets bigger. And then you have a problem to find a bug from yesterday or some days ago. How can you solve this?

Tutorial Free

How secure is Laravel?

After a while I'm back to my Laravel Business video channel, and topic of this 5-minute episode is security, for Laravel projects and beyond.

Tutorial Free

Why you shouldn't set global variables in Base Controller

Everyone had a situation when one variable had to be accessible in every view file, for some of us it was $user, for others it was $currentPage or any other case dependent variable. And some of you use Base Controller for that. Let me show you why it's wrong.

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.