Category : Laravel


Laravel 5 - How to prevent browser back button after user logout?

Today, I am going to share with you How to prevent back button after logout in PHP Laravel framework. If you observe deeply then you found this fault, When user logout after if user hitting back button from browser then it will goes on home page or existing page that he was before login. But it should redirect on Login page instead of homepage or other existing page. But we can prevent this issue by using Laravel middleware. We will create one middleware and prevent back button history. So we have to create new middleware and use that middleware in our route. So, I am going to do from scratc.....

By Hardik Savani | October 21, 2016 | | 3102 Viewer | Category : Laravel
READ MORE

Laravel 5 Redirect to URL using redirect() helper

In this tutorial, i am going to tell you how to redirect user one page to another page from controller method. we normally use <strong class="path">redirect()</strong> helper method for redirect user in controller. We can simply use redirect() helper in Laravel 5.0, Laravel 5.1, Laravel 5.2 and Laravel 5.3. Laravel 5 version provided redirect(). there are several way to do redirect URL in Laravel. In this post i am going to give you all the way to redirect URL with parameters. There are several methods through we can redirect URL in Laravel 5 as listed bellow: <strong>1) Redirect to URL</st.....

By Hardik Savani | October 19, 2016 | | 1145 Viewer | Category : Laravel
READ MORE

Laravel 5 - Full Text Search Example using Scout and Algolia Packages

Today, I am going to give example source code of How to implement full text search in your laravel 5.3 application using scout and algolia. Laravel 5.3 provide us several new feature and introduce new packages. Laravel 5.3 provide Scout Package for full text search from your Model. If you require to add full text search function in your laravel application then you have to choose scout package for to do. In this example i going to explain step by step, so you can simple understand and use it in your laravel project. In this tutorial i give from scratch so let's follow simple few step and imp.....

By Hardik Savani | October 16, 2016 | | 3352 Viewer | Category : Laravel
READ MORE

Laravel 5.3 - Form Input Validation rules example with demo

Today, I am going to give you how to use input form validation rules of Laravel 5.3. We always require to use form with validation in our Laravel application. So today you can learn how to implement validation rules and how to print error message on blade files. Laravel 5 provide several pre-define validation rules that way we can user it simply. In this example i used some validation rules that listed bellow that need to apply. <strong>1)required:</strong> for must be required field. <strong>2)min:</strong> for limit to enter minimum character. <strong>3)max:</strong> for limit to enter maxi.....

By Hardik Savani | October 14, 2016 | | 3744 Viewer | Category : Laravel
READ MORE

How to disable model timestamps in Laravel 5.3?

Sometimes we require to disable created_at and updated_at timestamps on Model on Laravel, so we can do it simply by using <strong class="path">$timestamps</strong> variable of model. It is very small things but important to understand and how to use it. When you create new item or user using model at that time created_at and updated_at column set default time by default but you can prevent to set false value of $timestamps variable. I am creating new records using create method of model like as bellow example: <pre class="prettyprint lang-php"> Item::create(['title'=>'ItSolutionStuff.com']).....

By Hardik Savani | October 12, 2016 | | 889 Viewer | Category : Laravel
READ MORE

Laravel 5.3 - Customize pagination templates example from scratch

Today, I am going to tell you how to building and apply new custom paginator view in Laravel 5.3. Laravel 5.3 added new features and update for easily implement your own manual pagination blade template. By Default Laravel 5.3 provide us very simple bootstrap pagination view. But if you are not using bootstrap and you want to change then you can simply change OR if you want to add new bootstrap pagination layout then you can do it. In bellow example you can see how to create custom blade layout and use them. This example from scratch so you can simply implement it in your project or laravel .....

By Hardik Savani | October 9, 2016 | | 4613 Viewer | Category : Laravel
READ MORE

Laravel 5.3 new feature and update - $loop variable

Laravel 5.3 provides several new features in API, Mail, Model, Blade Template etc. Today we learn new feature <strong class="path">$loop</strong> variable of blade view in Laravel 5.3. Laravel Blade templating language provides several things like @if, @foreach, @include etc and you know this thing very well. Laravel 5.3 give new variable $loop in blade template engine and you can use it with <strong>@foreach</strong>. $loop variable through we can simply get first and last records. Sometimes we require to give difference layout of first element and last element of loop. So, you can simply d.....

By Hardik Savani | October 6, 2016 | | 1293 Viewer | Category : Laravel
READ MORE

Laravel 5 - Multiple markers in google map using gmaps.js

Today, we learn how to implement google map with multiple marker using gmaps.js library in Laravel 5. We can also simply use google map API for maps, But gmaps.js is very popular and they provides very simple way to generate google map. gmaps.js through we can make multiple markers, make routes, Geocoding, Map events etc. In this example i use multiple markers example. If you are beginner then also you can do it simply following post, i did this example from scratch. So, After finish all tutorial you will find layout as bellow: <strong>Preview:</strong> <img src="/upload/laravel-5-gmaps.png.....

By Hardik Savani | September 30, 2016 | | 2298 Viewer | Category : Laravel
READ MORE

How to check uploaded file is empty or not in Laravel 5.3?

Today, in this post we will learn how to check uploaded file is present or not on request object. If you work on file uploading or image uploading then you have to require to check file array is empty or not. Laravel 5.3 provide two way to check file is present or not in request object. In bellow example you can see how to check. It is very simple example that way you can simply understand. <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function fileUpload(Request $request) { if ($request->hasFile('image')) { dd('write code here'); } } </pre> <strong>Example 2.....

By Hardik Savani | September 28, 2016 | | 795 Viewer | Category : Laravel
READ MORE

Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

Today, i am going to show you how to authenticate user node js using JWT and socket io in Laravel 5.3. It is very very important because if you are working with chat application or messengers system etc with user then you have to use JWT token because it is very safe and secure way. If we work on chat module with socket io but someone can easily hack our code. At that time we require to check given JWT token is valid or not using <strong class="path">socketio-jwt</strong> package of Node. socketio-jwt package thorough we can simply authentication with user and identify that token is valid .....

By Hardik Savani | September 25, 2016 | | 2799 Viewer | Category : Laravel
READ MORE

    Laravel 5 - elasticsearch with pagination example

    Laravel 5 - elasticsearch with pagination example

    Open Post

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Open Post

    Laravel 5 Ajax CRUD with Pagination example and demo from scratch

    Laravel 5 Ajax CRUD with Pagination example and demo from scratch

    Open Post

    PHP - jquery ajax crop image before upload using croppie plugin

    PHP - jquery ajax crop image before upload using croppie plugin

    Open Post

    Laravel 5 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Laravel 5 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Open Post

    How to add charts in Laravel 5 using Highcharts ?

    How to add charts in Laravel 5 using Highcharts ?

    Open Post