Tag : View


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 | | 6218 Viewer | Category : PHP 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 | | 6006 Viewer | Category : Laravel
READ MORE

How to set global view variables using composer share in Laravel 5?

Everyone will have same situation sometimes, like we have some information that we need to access in all view files for example site title, login user information, footer information etc. But, we can define global view variables using composer() of Laravel. We just have to define value in AppServiceProvider and we can access that variable in every blade files. In bellow example i set "siteTitle" variable as global and i can access that variable in every view files. You have to just open <strong class="path">AppServiceProvider.php</strong> and we can set variable as like bellow: <strong>app/.....

By Hardik Savani | July 8, 2016 | | 1023 Viewer | Category : Laravel
READ MORE

Laravel ajax render view with data example

Sometimes, we use get html view layout from ajax request. At that you have to first render view file and then you need to store view in varibale and then we can return that varibale. In bellow example i render view with pass data you can see how i did: <strong>Example:</strong> <pre class="prettyprint lang-php"> $data = $this->semester->getSemesterName($input); $type = "Subject"; $options = view("home.ajax",compact('data','type'))->render(); <br/> return $options; </pre>

By Hardik Savani | May 6, 2016 | | 1391 Viewer | Category : Laravel
READ MORE

How to check if View Exists or not in Laravel 5?

In some situations, we require to check if view exists then render view otherwise display something else. But you can perform this task using "exists" function of view helper. It will return true or false. So you can use bellow example. <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> if (view()->exists('users.index')) { .... } </pre>

By Hardik Savani | April 12, 2016 | | 754 Viewer | Category : Laravel
READ MORE

How to get url segment in Laravel 5?

Whenever you need to get current url segment then you can get using Request facade. I give you example one for using Request facade. so you can get segment from url and how you can see both example. <strong>Example:</strong> <pre class="prettyprint lang-php"> @extends('layouts.app') @section('content') {{ Request::segment(1) }} @endsection </pre>

By Hardik Savani | April 10, 2016 | | 2330 Viewer | Category : Laravel
READ MORE

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 | | 5421 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 | | 8172 Viewer | Category : Laravel
READ MORE

    Laravel 5 - How to create custom error page with example

    Laravel 5 - How to create custom error page with example

    Open Post

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

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

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

    Open Post

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    Open Post

    Laravel 5.3 Image Upload with Validation example

    Laravel 5.3 Image Upload with Validation example

    Open Post

    Jquery Select2 - Select box with search example code

    Jquery Select2 - Select box with search example code

    Open Post