Tag : Exists


Laravel 5.3 - import export csv and excel file into database

Laravel 5.3 release few days ago and they upgrade several feature on Laravel 5.3. They also some changes on directory structure and etc. So, Today I am going to give you one example how to import and export xls, xlsx and csv files. I also added post for Laravel 5, but this example will help you to implement on your Laravel 5.3 application. In this example through you can import excel or csv to store in database and export or download excel or csv file from database table. For this example i use maatwebsite package from scratch. Maatwebsite package though we can easily working with csv and .....

By Hardik Savani | September 18, 2016 | | 33288 Viewer | Category : Laravel
READ MORE

How to check if file exists or not in Laravel 5?

Nowdays laravel framework is popular framework in PHP Language. So, if you required to check if file is exists or not in given path then you can check eisily. Normally we always need to check if image exists, check if pdf file exists, check if docs exists or not etc. I give you two way to check file is Exists or not. one using file_exists() and second one using File facade of laravel 5. it's better if you preffer File facade example. So, let's see and implement: <strong>Example 1:</strong> <pre class="prettyprint lang-php"> if(file_exists(public_path('images/1461177230.jpg'))){ dd('File i.....

By Hardik Savani | April 23, 2016 | | 2951 Viewer | Category : Laravel
READ MORE

How to Check if Element is Exists or not in jQuery?

Most of the time we require to check specific element is exists or not in javascript. but jquery provide length() method that can help to check element is exists or not. If you are new and want to do this then see bellow example: <strong class="example">Example:</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> $(document).ready(function(){ if ($('.image').length) { console.log('yes, Image class is exists.'); } else { console.log('sorry, Image class is not exists.'); } }); </script> </pre>

By Hardik Savani | April 13, 2016 | | 626 Viewer | Category : Javascript jQuery
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 | | 868 Viewer | Category : Laravel
READ MORE

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

    PHP Image upload without refreshing page using jquery example

    PHP Image upload without refreshing page using jquery example

    Open Post

    Laravel 5 mailchimp api integration from scratch with example

    Laravel 5 mailchimp api integration from scratch with example

    Open Post

    Laravel 5 - Example of Database Seeder with insert sample data

    Laravel 5 - Example of Database Seeder with insert sample data

    Open Post

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Open Post

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post