Custom Helper functions in Laravel

In this post, we gonna create custom functions and load it in the Laravel project. These functions can be accessible all over the project. Loading custom helper functions in Laravel is pretty straightforward. Let’s follow the below steps, First, create a file called TextHelper.php the filename can be anything, and place your custom functions in… Continue reading Custom Helper functions in Laravel

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 actually run update column + 1 under the hood. You can specify a second parameter to this function, the amount of incrementing.… Continue reading Eloquent – A better way to increment or decrements an int

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.

Define Routes Open your routes/web.php directory and add following route definitions to it.

How to use Datatables in Laravel 5.8

In this tutorial, I will show you how to use the Datatables in the Laravel based project withyajra/laravel-datatables-oracle package. For this tutorial, we gonna use Laravel 5.8 version but the Datatable package usage steps will be pretty simpler with other versions of Laravel framework. As a first step lets setup a brand new Laravel project… Continue reading How to use Datatables in Laravel 5.8

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 decrement() methods to increase and decrease the numbers respectively. How to use increment() and decrement()