Latest Post

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 | | 39212 Viewer | Category : Laravel

How can i print php variable in jquery?

If you are working on php and you need to print your php variable inside the javascript then you can simple get value. you can use "" for get value of php variable. in following example you can see : <strong>Example:</strong> <pre class="code language-html"> <script type="text/javascript"> var my_var = "<?php echo $my_variable; ?>"; console.log(my_var); </script> OR <script type="text/javascript"> var my_var = <?php echo $my_variable; ?>; console.log(my_var); </script> </pre> But, you can use on php file, Not on js file.

By Hardik Savani | February 8, 2016 | | 20836 Viewer | Category : PHP Javascript jQuery

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 "" 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 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 | | 29140 Viewer | Category : PHP Laravel Rakuten Marketing API

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 | | 71310 Viewer | Category : Laravel

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 | | 29875 Viewer | Category : Laravel