Category:: Laravel

Laravel download files via FTP

This post is going to be about downloading files from remote server via FTP mechanism in your Laravel application. Let’s create a controller called DownloadController.php Now let’s inform about this controller […]

Create REST API with the Laravel 5.3

This tutorial provides an example of building a complete RESTful API using Laravel 5.3.* Framework. You gonna use the different HTTP methods during the REST api development, quick introduction about each method. GET to […]

Laravel 5 Pagination with array

Laravel provides pagination for Eloquent results out of the box, but for custom data we need to do the pagination manually. In this tutorial, I’ll use Laravel5 LengthAwarePaginator class to show you how you can create […]

Coming up in laravel 5.3

Laravel5.3 is coming with following new features, 1. Rollback one migration 2. Blade Foreach Loops (new $loop variable) 3. Eloquent Collections are cleanly serialized and re-pulled by queued jobs 4. Queue console output […]

Custom Facade in Laravel 5.2?

In Laravel world, a facade is a class that provides access to an object from the container. Laravel “facades” serve as “static proxies” to underlying classes in the service container, providing […]

How to Run Gulp Tasks in Laravel with Elixir

This tutorial describes how to use laravel’s elixir to run Gulp tasks. Gulp is a javascript task runner, its keeps things simple and makes complex task manageable. Here I am gonna show you how easy it is to use Gulp […]

Multiple Route files in Laravel 5

For small scale applications single route file is sufficient but large scale applications its cumbersome to maintain and organize the routes. The solution for this was creating multiple route files. For example if you […]

Laravel Eloquent – make a copy of a row

Today I would like to write about one of the little known feature of laravel eloquent called “replicate”. To copy everything from existing row we just need to call replicate() method on eloquent modal object […]

Laravel 5.2 – Implicit model binding

Laravel’s route model binding has been around for a while, but Laravel 5.2 is about to make it even easier with Implicit model binding. Implicit model binding makes it painless to inject relevant models directly […]

Laravel 5 – SHA1 encryption instead of BCrypt

Recently I have migrated core PHP application to Laravel5 framework. Old application used SHA1 encryption so I have implemented Hashing contracts of laravel5 to use SHA1 instead of BCrypt. Create Directories in “app” […]

Laravel 5 – Prevent Browser back button after Logout

In this post I would like to share a simple Laravel5 Middleware which prevent going back to previous protected page after Logout by hitting the back button on your Browser. When you hit the browser back button after logout, […]

How to add custom class in Laravel 5

In this tutorial I will show you how to add custom class in Laravel 5. For example my class name is Common.php. Now create a directory called Mylibs in app directory(app/Mylibs). Place your custom class in created directory […]

Laravel5 Inactivity idle session logout

In this post I would like to show how to automatically logout user after some period of inactivity. Session timeout or Session expire depends on the server configuration so in order to achieve our target we are going to […]

Laravel 5 Maintenance Mode

Enabling and disabling maintenance mode in Laravel 5 is simple, you just need to issue following artisan commands – To enable maintenance mode php artisan down. To disable maintenance mode php artisan up. That is […]

Polymorphic Eloquent Relationships in Laravel 5

In this post I would like to show you creating polymorphic relationships in the Laravel5 application. Probable polymorphic relationships are the most advanced eloquent relationships in all available joins in Laravel. Polymorphic […]