Eloquent – A better way to increment or decrements an int

Laravel has in-built increment() and decrement() functions to increase or decrease a value of the column, by 1 or with the given number. Below are the examples:

That’s it – it will […]

Laravel Drop all tables

This is useful for migrations when you can’t rollback. It can easily be run in artisan mode or you can create a console command.

I hope you like this Post, Please feel free to comment […]

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. […]

Laravel Eloquent Increments and Decrements value

In this post, I would like to show you the hidden and useful functions of Laravel’s Eloquent ORM to Increment and Decrement value of the fields in the database column. In my recent project, I used increment() and […]

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

How to force download files in Laravel?

Giving download option to the user is a pretty common requirement in today’s web apps for the variety of reasons. For example, if your application is related to online shopping, you might need an invoice download […]

How to Clear cache in Laravel 5

Here I am gonna show you few artisan commands which will help you to clear different caches in your Laravel application. Clear Application Cache To clear application cache use the php artisan cache:clear command.

[…]

How to check current installed version of Laravel ?

You can use laravel’s artisan command to check currently installed version of Laravel Framework Version of Laravel Issue below command from your terminal, make sure to be in application root while issuing command. […]

DMCA.com Protection Status