Category : Laravel


How to implement infinite ajax scroll pagination in Laravel 5?

We always want to see auto load more data on page scroll on your home page or other pages for posts, news, listing etc like on facebook, twitter, linkedin etc. If you implemented infinite scroll on your php application then you don't require to give pagination and also not require to page refresh every time when page scroll. So, Today, i going to give you simple example of infinite scroll using jquery ajax on page scroll in laravel application from scratch. I use jquery scroll event for page scroll. this example is pretty simple, you can customize simply for your development. You have to jus.....

By Hardik Savani | August 23, 2016 | | 3005 Viewer | Category : Laravel
READ MORE

How to get table name from model in Laravel 5?

If you need to get table name from model in your laravel application then this post can help you to get table name. Laravel based on MVC. So, we require to create model for every table that way we can write database logic on model. But if you require to get table name from model then you can get using getTable() of model. Laravel eloquent model provide several methos like for all(), get(), first() etc, that helps to get table record from model table. You can get table name simply call getTable() of model object, so how to call this method as bellow example. <strong>Example:</strong> <pre c.....

By Hardik Savani | August 22, 2016 | | 989 Viewer | Category : Laravel
READ MORE

How to get year, month and day from timestamp date using carbon in Laravel 5?

We may sometimes require to get only year or only month or only day from current data then you can do it using carbon. carbon object through we can change date formate or get hour from date and etc. I give you three example first for get year from date, second for get month from date and third for get day from date. So, you can do it easily on your laravel 5 application. You can see bellow examples and try it, maybe it can help you... <strong>Example 1: Get Year</strong> <pre class="prettyprint lang-php"> $timestemp = "2016-4-5 05:06:01"; $year = Carbon\Carbon::createFromFormat('Y-m-d H:i:s'.....

By Hardik Savani | August 18, 2016 | | 890 Viewer | Category : Laravel
READ MORE

How to make simple dependent dropdown using jquery ajax in Laravel 5?

In this tutorial, I am going to do a simple dependent drop down list in Laravel 5 application using jquery ajax. In this simple example through we understand how to work dependent dropdown in laravel even if you beginner. We sometimes require to make dependent dropdown like when state select at that time bellow city drop down list should change, i mean related to selected state. In this example i have two tables and there are listed bellow: <strong>1.demo_state</strong> <strong>2.demo_cities</strong> So, when user will change state at that time, dynamically change city drop down box from data.....

By Hardik Savani | August 16, 2016 | | 3806 Viewer | Category : Laravel
READ MORE

Solve - Installation request for guzzle/guzzle in laravel

When i was working on my updated ubuntu version, i did fetch this problem. I had ubuntu 14.04 then i updated ubuntu 16.04, at that time i think PHP version also updated PHP 5 from PHP 7. Ubuntu 16 updated successfully but when i was trying to composer install or update on my project i was found guzzle package error and to enable extensions php 7 extensions as like bellow: <strong>Error</strong> <pre> Problem 1 - Installation request for guzzle/guzzle v3.8.1 -> satisfiable by guzzle/guzzle[v3.8.1]. - guzzle/guzzle v3.8.1 requires ext-curl * -> the requested PHP extension curl is missing from .....

By Hardik Savani | August 15, 2016 | | 950 Viewer | Category : Laravel
READ MORE

How to check request is Ajax or not in Laravel 5?

Sometimes, we need to check request is ajax or not in laravel 5. If you want to call same method but if request is ajax then you perform different, then you can do by using $request object. In Laravel 5 $request object provide method to check request is ajax or not, In following example you can see how it's works. You can check directly from Request facade and also from request object, both are same, so let's see bellow example. <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function index(Request $request) { if($request->ajax()){ return response()->json([.....

By Hardik Savani | August 13, 2016 | | 1260 Viewer | Category : Laravel
READ MORE

Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

We always have to do image uploading in our laravel application, In this post i give you example code of how to upload multiple images using dropzone.js. dropzone.js through we can make image uploading very simply and with best layout. Dropzone.js is a jquery plugin, dropzone.js through we can select one by one image and also with preview. After choose image from browse we can see preview of image. dropzone.js also provide filter like we can make validation for max upload, specific image or file extension etc. In this example i create two route, one for display view and another for store ima.....

By Hardik Savani | August 11, 2016 | | 5004 Viewer | Category : Laravel
READ MORE

Laravel notification message popup using toastr js plugin

In this post, i would like show you how to add toastr js plugin notification popup in Laravel from scratch. toastr plugin provide us success message notification, info message notification, warning message notification, error message notification that way we can add notification with good layout. Laravel have also several package for notification but i use toastr js plugin, that provide nice layout and pretty interesting. We require to add one time toastr jquery code for notification, then we can manage using session. In this example you can easily understand how to implement and use. First.....

By Hardik Savani | August 9, 2016 | | 1988 Viewer | Category : Laravel
READ MORE

How to get current url with parameters in Laravel 5?

We sometimes require to get full url path with query string parameters that way we can perform on it. So we can get current url with also all parameter using several method of laravel. There are several option to get full url with query string as listed bellow: <ul> <li><strong>URL Facade</strong></li> <li><strong>Request Facade</strong></li> <li><strong>$request Object</strong></li> </ul> I give you three way to get full path with parameters, so you can see as bellow: <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function index() { $fullURL = \URL::full(); p.....

By Hardik Savani | August 8, 2016 | | 862 Viewer | Category : Laravel
READ MORE

How to get current month records in Laravel 5?

In this post, i give you example query of how to fetch current month records from table using Laravel query builder. We sometimes require to get records that created on current month. i.e if current month is august and we need display records of august month on out admin dashboard. In this example you can see how can get you current month records and i used whereRaw() of laravel query builder with MONTH() mysql that way we can get month and compare with current month. I have one created items table that structure as bellow you can see. <strong>items table</strong> <img src="/upload/laravel-.....

By Hardik Savani | August 7, 2016 | | 1071 Viewer | Category : Laravel
READ MORE

    Solved - opencart this merchant is not enabled for auth/settle

    Solved - opencart this merchant is not enabled for auth/settle

    Open Post

    AngularJS - convert comma separated string to array example

    AngularJS - convert comma separated string to array example

    Open Post

    Jquery select2 ajax autocomplete example with demo in PHP

    Jquery select2 ajax autocomplete example with demo in PHP

    Open Post

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 2

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 2

    Open Post

    Laravel 5.3 new feature and update - $loop variable

    Laravel 5.3 new feature and update - $loop variable

    Open Post

    How to check current password using hash check in Laravel 5.3?

    How to check current password using hash check in Laravel 5.3?

    Open Post