How to Upload, download, remove Files to Amazon S3 Using Laravel

Create a controller called UploadController.php with following code.

Create a view file Create a file called upload.blade.php in the resources/views directory and place below inside it. […]

How to get last inserted id in Laravel

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() […]

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 5 – SHA1 encryption instead of BCrypt

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

Laravel 5 – Prevent Browser back button after Logout

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

How to add custom class in Laravel 5

In this tutorial, I will show you how to add a custom PHP class in Laravel 5.x application. For example, Lets call our class Common.php. Create a directory called Mylibs in app directory along with your class, Ex: Common.php. […]

Laravel 5 get current authenticated user?

Upon successful login you can get current user details by called Auth::user() method. It will return null if no user logged in or there is no current user. On successful login Auth::user() return value is based on your […]

How to redirect requests to HTTPS in Laravel 5

I know we can achieve same with other methods but I am going do it with the Laravel’s Middleware. So let’s create Middleware called ForceHttpProtocol. How it will work Our ForceHttpProtocol middleware will […]

DMCA.com Protection Status