A place where all members can share their Laravel & PHP tutorials, links, news, packages, etc.

Create New Post Contact Us

How to change Form Request Validation Rules based on HTTP Request Method

In this post I will show you how to change your Laravel validation rules based on the request method type. This is useful when you want your validation logic encapsulated in one validation class. By the way. There’s nothing bad about having sev

Laravel Social Media - Authentication & posting statuses

Sam shows you how to authenticate users and post status using Laravel 5 framework.

Create a View inheritance in Laravel

ften times - for example, with index page lists - we have virtually the same blade for all of our models. "Virtually" all is the key word - because of course, a few will have some small differences. The temptation is to start adding conditi

Easy timezones in Laravel with Carbon

Here is a simple way to manage storing and displaying dates and times in Laravel in the user's timezone.

First of all, we are going to store all dates and times in UTC. In Laravel, make sure that the timezone is set to UTC in config/app.php

Upload multiple images using jQuery, Ajax, PHP

We have received many requests from our readers on how to upload multiple images using jQuery, Ajax and PHP without refreshing the page or on fly. So, we have written the simple tutorial about multiple images upload using jQuery, Ajax and PHP. In thi

A PHP 7 / Laravel package to create slugs

Spatie, the company where I work, recently released a Laravel package called laravel-sluggable. It automatically creates unique slugs when saving a model.

To install that package you just need to put the provided Spatie\Sluggable\HasSlug-trait on

Using collection macros in Laravel

Laravel 5.2 provides some nice additions to the framework. One handy feature that I don’t see listed in the release notes is that Collection now is macroable. Using it’s macro function you can easily extend Illuminate\Support\Collection

Form array validation in Laravel 5.2

It's time to start writing about the new features in Laravel 5.2! You'll notice that many of these features are quicker and easier to learn and write up, so it may seem that it's a smaller release. But many of the features in 5.2 will