Tutorials

Be Careful: Laravel 5.8 Added bigIncrements As Defaults

There is one change in Laravel 5.8 that is not mentioned in the official Upgrade Guide but caused me problems - I couldn't create a foreign key migration, and spent half-hour until found out the reasons. So I want to share, maybe you will encounter the same thing.

Laravel SaaS: Free Trial Implementation

Laravel is a good framework to create "software-as-a-service" solutions - with monthly payments by users. Usually, it should incorporate some kind of Free Trial mechanism. In this article, will show you my version of how to do it in Laravel 5.8.

6 Tips About Data Seeding in Laravel

Laravel migration mechanism has a great function of seeding data. In this article, I will show random tips from my own experience, how to use seeding in real-life cases.

Simple Laravel Multi-Tenancy with Single Trait

Multi-tenancy is pretty common in web-projects - when you want to give records access only for users who created those records. In other words, everyone manages their own data and don't see anyone else's data. This article will show you how to implement it in the most simple way, in single database.

From Google+ API to Google Sign In with Laravel Socialite

In December of 2018, I've received an email from Google, saying that they are shutting down Google+ API on March 7, 2019, and that I have 3 projects that use it for Login with Google. They suggested to move from "Google+ Sign In" to "Google Sign In". Subtle difference, but new API. Luckily, it is all well covered by Laravel Socialite, and this article will show you how to use it.

How to Ban/Suspend Users in Laravel Project

Laravel Auth system has a lot of features, but it doesn't include suspending users for some time, like banning some angry forum user for 14 days to calm down. Luckily, it's easy to implement, with Middleware. This article will show you how.

Laravel API Errors and Exceptions: How to Return Responses

API-based projects are more and more popular, and they are pretty easy to create in Laravel. But one topic is less talked about - it's error handling for various exceptions. API consumers often complain that they get "Server error" but no valuable messages. So, how to handle API errors gracefully? How to return them in "readable" form?

Laravel Form with jQuery UI Tabs: Validation Error Redirect to Active Tab

If you have a form separated into a few tabs with jQuery UI Tabs, then default Laravel validation will redirect you back to the first tab, even if the error was on the third tab. How to override it and set the correct tab proactively?

Nested Resource Controllers and Routes: Laravel CRUD Example

When building CRUD-like projects, sometimes you want some items be accessible only with their parent, for example in countries-cities relationships, you don't want to list all the cities in the world, but only by country, like /countries/123/cities, where 123 is country_id. This article will show you how to do it, using Route::resource() and usual CRUD controllers.

Multi-Language Routes and Locales with Auth

Multilanguage projects are quite easy to configure in Laravel, but if you want to have locale as part of URL, like /en/about, then you will have trouble with Auth::routes(), they won't work by default like /en/register. This article will show you what to do.

STAY CONNECTED

1,755FansLike
5,177FollowersFollow
6,092SubscribersSubscribe

NEWEST VIDEOS

RANDOM ARTICLES