Latest Laravel Post


Laravel 5.2 and AngularJS CRUD with Search and Pagination Example.

Now i show you how to create CRUD(Create, Read, Update, Delete) using AngularJS and Laravel 5. In Following step by step you can create web application of create, edit, delete, lists, search with pagination of items modules. In this post through you can make simple crud, search and pagination module and easily use in your laravel project. I am going to show preview of items module that we will do using angularJS and Laravel 5.2. <strong>Preview</strong> <img src="/upload/laravel-angular.png" width="100%" style="border:2px solid cadetblue" /> <strong class="step">Step 1: Create items table an.....

By Hardik Savani | February 15, 2016 | | 73576 Viewer | Category : Laravel
READ MORE

How to get hours difference between two dates in laravel?

Whenever you need to get difference between two dates in hours in laravel 5 then you can get easily using Carbon. Laravel by default provide Carbon class. Carbon class throught you can calculate difference between two dates in hours. In Following example you can see, we have a two dates, first $to variable and second one $from variable. Carbon class diffInhours function using you can get difference between two dates. I hope you will find your solution. <strong>Example:</strong> <pre class="language-php"> $to = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', '2015-5-5 3:30:34'); $from = \Carb.....

By Hardik Savani | February 13, 2016 | | 2181 Viewer | Category : Laravel
READ MORE

How to store all record in laravel5 Cache

if you are work with large application which depend on large query and required large number of record at that time your application performence littel bit down. that problem overcome with laravel Cache functionality. Laravel Cache provide to you store your large query in cache so your application performence improve. first of all you must write <stong>"use Cache"</strong> keyword on top of the your class Here is an example using Laravel’s Fluent Query Builder: <pre class="language-php"> $users = DB::table('order') ->orderBy('price', 'desc') ->take(10) ->.....

By Hardik Savani | February 11, 2016 | | 1019 Viewer | Category : Laravel
READ MORE

How to create custom facade in laravel 5.2?

Sometimes we are use repeat code and repeatedly use function at that time we can create custom facade for our project, that way you can create functions and use it.So, How to generate custom facade, I give you the few step to create custom facade: <strong>Step 1:Create class file app/ItSolution/DemoClass.php</strong> In Following step, first you should create "ItSolution" directory in app folder and create file DemoClass.php(<strong style="color:red">app/ItSolution/DemoClass.php</strong>).now copy the following code in your DemoClass.php file. <strong>app/ItSolution/DemoClass.php</strong> <pr.....

By Hardik Savani | February 10, 2016 | | 9465 Viewer | Category : Laravel
READ MORE

How to create custom helper in Laravel 5?

I would like to explain how to create custom helper functions, in your laravel project some functions and some repeating code, so at that time you have to create some helper functions that can help to easy way and every time you not need to write more code and very flexible, that way you can easily modify that code. Now if you want to add custom helper functions in your website or project directoty then you have to follow just three step and use it. <strong>Step 1: Create helpers.php File</strong> In this step, you need to create <strong style="color:red">app/Http/helpers.php</strong> in you.....

By Hardik Savani | February 9, 2016 | | 8332 Viewer | Category : Laravel
READ MORE

How to get product using rakuten marketing api in PHP?

In this post you can find how can use rakuten linkshare API in our php website. first you need to create class for retrieve data from "https://pubhelp.rakutenmarketing.com/hc/en-us" website. now i give to example of product search, but if you use this class then you can easy to implement your other search like advance search etc. So now i am giving you class that send request to rakutenmarketing.com website and get data. but this class you can also you for other site API use like CJ API. <strong>Your php file :</strong> <pre class="language-php"> public function getProduct() { // Bearer to.....

By Hardik Savani | February 6, 2016 | | 4018 Viewer | Category : Laravel
READ MORE

Example of Cron Job in Laravel 5

Whenever you want to define your scheduler task, and if you are working on laravel framework then you can do it easy way and very secure. Laravel provide <strong>Scheduling</strong> and Scheduling through you can manage your cron, if you need to run every day, every minute, every hourly, weekly, on specified days.So, basically i going to give example how to create cronjobs in laravel. First you have to create one command that way you can create proper programming and good way, but you can also do without create command, It is good if you create your own command and with good code. So, open yo.....

By Hardik Savani | February 6, 2016 | | 10803 Viewer | Category : Laravel
READ MORE

How to get months difference between two dates in laravel?

Whenever you need to get difference between two dates in months in laravel 5 then you can get easily using Carbon. Laravel by default provide Carbon class. Carbon class throught you can calculate difference between two dates in months. In Following example you can see, we have a two dates, first $to variable and second one $from variable. Carbon class diffInMonths function using you can get difference between two dates. I hope you will find your solution. <strong>Example:</strong> <pre class="language-php"> $to = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', '2015-5-5 3:30:34'); $from = \C.....

By Hardik Savani | February 6, 2016 | | 1731 Viewer | Category : Laravel
READ MORE

How to get last inserted id in laravel 5?

Its very common need to get last insert id in programming field, if you are working on laravel framework and you want to fetch last created id, i mean max id, then you do easily.laravel provide method to get last inserted id. If you are working with DB::table() then you have to use insertGetId() for insert data into database. this function always return inserted record id(primary key).it is very simple way to get id, in following example you can see and undestand more: <strong>Example:</strong> <pre class="language-php"> public function getLastInsertedIdDB() { $id = DB::table('items')->inser.....

By Hardik Savani | February 6, 2016 | | 11836 Viewer | Category : Laravel
READ MORE

How to increment or decrement a column value in laravel?

Whenever you need to increment or decrement value of column in database, then you do not need to first fetch that record and then update, so that way we will make long code and very hard code, so basically you can increment and decrement by using increment() and decrement() statment of laravel query builder. If you want to increment or decrement opration using update() method of laravel query builder then you also do that, in following example i am showing you how to increment and decrement value of column in table by using increment(), decrement() and update(). <pre class="language-php"> na.....

By Hardik Savani | February 2, 2016 | | 5675 Viewer | Category : Laravel
READ MORE

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Open Post

    How to add charts in Laravel 5 using Highcharts ?

    How to add charts in Laravel 5 using Highcharts ?

    Open Post

    Laravel 5 create custom artisan command with example

    Laravel 5 create custom artisan command with example

    Open Post

    Laravel 5.2 chat message module using socket.io, redis, express and nodejs from from scratch.

    Laravel 5.2 chat message module using socket.io, redis, express and nodejs from from scratch.

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Laravel 5 - Image Upload and Resize Example using Intervention Image Package

    Open Post