Tutorials

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.

Working with MySQL JSON Columns in Laravel: Custom Properties Example

JSON fields are gaining more popularity since they became officially supported in MySQL 5.7.8. Even the popular Spatie Laravel Medialibrary package use them, so why shouldn't we? This tutorial will show you an example.

Generate Slug Keyword from Title: Laravel + AJAX

If you work with project or blog where records require so-called slug (posts, pages etc.), it's convenient to generate slug immediately after title has been typed in. This article will show you how to do it in Laravel, with AJAX and with a help of one Laravel package.

Multiple File Upload with Dropzone.js and Laravel MediaLibrary Package

File upload is one of the most popular features in modern web. And we have quite a few libraries that can help us to build upload form. Let's take two of my favorites - Dropzone on the front-end, and Spatie MediaLibrary on the back-end, and build a great uploading experience, in this tutorial.
invite only laravel auth

Laravel Auth: Make Registration Invitation-Only

Laravel comes with great Auth out-of-the-box. But some projects don't allow public registration, they send invitation links instead. This article will show you how to implement it.

Laravel: Find Addresses with Coordinates via Google Maps API

Quite often we need to save addresses in the database, and we want them to be accurate. Probably, the best way to ensure it is to provide customers with input field where they choose the address from auto-completed values as they type. This article will show you how to achieve it in Laravel, let's build a "location picker" with Google Maps API.

STAY CONNECTED

1,822FansLike
5,820FollowersFollow
6,768SubscribersSubscribe

NEWEST VIDEOS

RANDOM ARTICLES