Latest Laravel Post


Laravel 5 custom pagination view example

laravel default also provide pagination view using bootstrap design like next and previous button and number page with link. but it is a very comman and generally used by most of developer. If you want to change it using Presenter class of laravel. you can set your own custom view for your pagination layout. In bellow i give you the example of i added first, last, next and previous button and main banifit is that you can easily modify that view and link. so let's see the preview of image layout of pagination. <strong class="preview">Preview:</strong> <img width="100%" src="/upload/laravel_pa.....

By Hardik Savani | March 23, 2016 | | 18219 Viewer | Category : Laravel
READ MORE

Laravel 5 clear cache from route, view, config and all cache data from application

In this post i would like to share my experience and solution. when i was working on my laravel e commerce website with gitlab. I was fetching one issue suddenly my view cache with error during development. i did try lot to refresh and something other but i can't see any more change in my view, but at last I did resolve my problem using laravel command so, let's see i added several command for clear cache from view, route, confir etc. <strong class="example">Reoptimized class loader:</strong> <pre class="prettyprint lang-php">php artisan optimize</pre> <strong class="example">Clear Cache fac.....

By Hardik Savani | March 22, 2016 | | 60822 Viewer | Category : Laravel
READ MORE

Pixel tracking code php example

pixel tracking technology is use when you need to give your commerce websites or something else that you need to give that site banner or add on another website. we can use pixel tracking technology because which can help to count impressions. but if you want to use pixel tracking technology code in your wesite than you can do following way. In bellow example i did craete one banner image for my site products add. i will give html code for display my site product banner in his site. so in this example i use pixel tracking technology for the impressions. so first lets give following code like .....

By Hardik Savani | March 21, 2016 | | 3902 Viewer | Category : Laravel
READ MORE

Laravel 5 manual pagination with array example

If you neeed to create custom pagination of your array, you can learn from this post. basically we are doing pagination with model or DB facade like "User::paginate(10)" OR "DB::table('users')->paginate(10)". But now if you have new array and you want to make pagination on your array then you can also give using "LengthAwarePaginator" class see following example: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> public function myData($userid) { $data = static::get(); <br/> $result = []; if(!empty($data)){ foreach ($data as $key => $value) { .....

By Hardik Savani | March 21, 2016 | | 14159 Viewer | Category : Laravel
READ MORE

How to add charts in Laravel 5 using Highcharts ?

Laravel 5's Blade template engine is awesome. you can easyly use PHP variable, js and js library in laravel view. i will create chart using Highcharts in my laravel application. Highcharts is a js library, this library through we can use bar chart, line chart, area chart, column chart etc, Highcharts also provide sevral theme and graph that way you can use more chart from here : <a target="_blank" href="http://www.highcharts.com/">HighCharts Site</a>. whenever you need to add charts in laravel server side. then you can easily use following example you have to fetch data from database and then.....

By Hardik Savani | March 16, 2016 | | 33583 Viewer | Category : Laravel
READ MORE

How to create Event for Mail sending in Laravel 5.2?

Events provides a simple observer implementation, allowing you to subscribe and listen for events in your application. In this posts you can learn how to create event for email send in your laravel 5.2 application. event is very help to create proper progmamming way. First create event using bellow command. <pre class="prettyprint lang-php">php artisan make:event SendMail</pre> Ok, now you can see file in this path <strong class="path">app/Events/SendMail.php</strong> and put bellow code in that file. <strong>app/Events/SendMail.php</strong> <pre class="prettyprint lang-php"> namespace App\Ev.....

By Hardik Savani | March 13, 2016 | | 37340 Viewer | Category : Laravel
READ MORE

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

In this tutorial, i going to show you how to make real time chat message module using socket.io, redis, express and nodejs in Laravel 5. socket.io through we can make real time chat module in our Laravel 5 application. i show you from scratch because you can install nodejs and its packages etc. in this post you can undestand and learn step by istalling and how to write code. You have to follow the step and implement real time chat module in your application. So basically you can see bellow preview of our chat message module. <strong>Preview:</strong> <img width="100%" src="/upload/socketio.png.....

By Hardik Savani | March 12, 2016 | | 126974 Viewer | Category : Laravel
READ MORE

Laravel 5 export to pdf using maatwebsite example

In this post i will show you how to export or download pdf file from database table by maatwebsite. maatwebsite packages throught you can easily generate pdf file. so now i show you simple example of items table data, you can donwload in pdf formate. In following few step you can implement export both function in your project. we have to also need to use dompdf package for pdf generater. let's follow step. <strong class="step">Step 1: Installation</strong> Open your composer.json file and add bellow line in required package. <strong>Laravel 5</strong> <pre>"maatwebsite/excel": "~2.1.0"</pre> <.....

By Hardik Savani | March 9, 2016 | | 51453 Viewer | Category : Laravel
READ MORE

How to use where clause with mysql function in Laravel 5?

When you are working on laravel projects and you need to use mysql function in where clause then you can easily use that using DB::raw() and whereRaw(). In this example you can show how to i use mysql function in where clause. In this example i want to compare with year of created_at field but not whole date, that's whay i use mysql function Year(), this function will return only year from timestamp and compare with given value. I add two example of how to use sql function in where cause. let's See both example. <strong class="example">Example 1:</strong> <pre class="prettyprint lang-sql"> $da.....

By Hardik Savani | March 9, 2016 | | 3181 Viewer | Category : Laravel
READ MORE

How to get latitude longitude from mysql in laravel 5?

Whenever you need to get nearest posts from lat and long and if you are working on laravel query builder. then you can get distance easily using DB::raw(), so you can learn from following example how to get nearest value from mysql laravel. <strong>Example:</strong> <pre class="prettyprint lang-php"> $lat = 1; $lon = 1; DB::table("posts") ->select("posts.id" ,DB::raw("6371 * acos(cos(radians(" . $lat . ")) * cos(radians(posts.lat)) * cos(radians(posts.lon) - radians(" . $lon . ")) + sin(radians(" .$lat. ")) * sin(radians(posts.lat))) AS distance")) ->groupBy("posts.id") ->ge.....

By Hardik Savani | March 8, 2016 | | 5149 Viewer | Category : Laravel
READ MORE

    Jquery - Animated typing effect using typed js example with demo

    Jquery - Animated typing effect using typed js example with demo

    Open Post

    Mailgun setup with Laravel 5 example

    Mailgun setup with Laravel 5 example

    Open Post

    Jquery - input tags plugin example using jquery.tagsinput.js plugin

    Jquery - input tags plugin example using jquery.tagsinput.js plugin

    Open Post

    Codeigniter 3 - select2 ajax autocomplete from database example with demo

    Codeigniter 3 - select2 ajax autocomplete from database example with demo

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post

    Codeigniter JQuery Ajax image upload example from scratch

    Codeigniter JQuery Ajax image upload example from scratch

    Open Post