In this post, I would like to show the different ways to get last inserted ID from the database table when working with Laravel PHP Framework. In the core PHP, we will get last inserted ID with mysqli_insert_id() or PDO::lastInsertId() […]
How to create an image from base64 format in Laravel 5.4
I will show you, how is easy it is to convert base64 format image to image. All you have to extract the base64 image data from that string, decode it and then you can save it to disk. Here is the function, which will save […]
Laravel 5.4: Fluent Routing
Laravel 5.4 has released another pretty cool routing improvement. In this post, I would like to show you the improved fluent Registering Routes. In the past, you used to define a named route like this at the end of the […]
How To Validate Date Format in Laravel
In this post, I would like to show you date format validation in Laravel application, You should always validate forms to ensure that you receive data in the good format. Date validation Rules Here is the list of validation […]
Laravel API Token Authentication
If you want to create a simple REST API, secured by web tokens for your mobile application or angular based application, you could develop it with Laravel, with very simple steps. In Laravel 5.2, Taylor Otwell introduced […]
bootstrap 4 carousel with Laravel
Laravel’s Blade templating engine’s @foreach control structure directive has $loop variable which is available inside every @foreach loop. The $loop variable is a stdClass object that provides meta information […]
Laravel Create Controller, Model and migration in one Artisan Command
Artisan is the command-line interface included with Laravel. It provides a number of helpful commands that can assist you while you build your application. Here I am gonna show you a command which will generate controller, […]
How to record last login time and IP address of a user In Laravel
Recording last login information is useful and you can easily save and update the last login time and IP address of the client. You can achieve this in several ways but I am gonna show you very simple and effective technique, […]
Laravel 5 Role Based Access Control using Middlewares
In this post, I would like to show you very simple approach to develop a security layer around Laravel routes with custom Middleware. Laravel Middleware Middleware provides a convenient mechanism for filtering HTTP requests […]