Tag : Check


How to delete multiple records using checkbox in Laravel 5 ?

It's almost need to give feature for remove multiple records using checkbox, if you are developing e-commerce application or any big web application then you must give feature to delete multiple records. So in this post, i will let you know how to delete multiple records with checkbox in laravel 5 application. here i also give multiple delete and you can also delete single records. Few days ago i posted for confirmation before delete record, so you can read from here : <a href="http://itsolutionstuff.com/post/laravel-5-confirmation-before-delete-record-from-database-exampleexample.html" targ.....

By Hardik Savani | July 18, 2017 | | 17298 Viewer | Category : PHP Laravel Bootstrap jQuery MySql Ajax
READ MORE

How to check uploaded file is empty or not in Laravel 5.3?

Today, in this post we will learn how to check uploaded file is present or not on request object. If you work on file uploading or image uploading then you have to require to check file array is empty or not. Laravel 5.3 provide two way to check file is present or not in request object. In bellow example you can see how to check. It is very simple example that way you can simply understand. <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function fileUpload(Request $request) { if ($request->hasFile('image')) { dd('write code here'); } } </pre> <strong>Example 2.....

By Hardik Savani | September 28, 2016 | | 5103 Viewer | Category : Laravel
READ MORE

How to check request is Ajax or not in Laravel 5?

Sometimes, we need to check request is ajax or not in laravel 5. If you want to call same method but if request is ajax then you perform different, then you can do by using $request object. In Laravel 5 $request object provide method to check request is ajax or not, In following example you can see how it's works. You can check directly from Request facade and also from request object, both are same, so let's see bellow example. <strong>Example 1:</strong> <pre class="prettyprint lang-php"> public function index(Request $request) { if($request->ajax()){ return response()->json([.....

By Hardik Savani | August 13, 2016 | | 16166 Viewer | Category : Laravel Ajax
READ MORE

How to get file size in php ?

If you require to get file size in php then you can do it easily using filesize() of PHP. Normally we require to get and check on before image uploading. So if you want to get image size then bellow example can help you. It will return size on byte. <strong>Example:</strong> <pre class="prettyprint lang-php"> echo filesize('flower10.jpg') . ' bytes'; </pre>

By Hardik Savani | April 29, 2016 | | 967 Viewer | Category : PHP
READ MORE

How to check user login or not in Laravel 5?

If you are new and you trying to find how to detect user is login or not in your laravel application. So, it is very easy to check because laravel 5 provide to Auth facade for check user is login or not. Check bellow example: <strong>Example:</strong> <pre class="prettyprint lang-php"> @if (Auth::check()) {!! print_r("User is login.") !!} @else {!! print_r("User is not login.") !!} @endif </pre>

By Hardik Savani | April 28, 2016 | | 1110 Viewer | Category : Laravel
READ MORE

How to check file is exists or not in PHP?

If you need to check file is exixt or not on folder. Normally we require to check image is exist or not, video is exists or not etc. In this example i use file_exists() for determine file is available or not in given path. So if you also need check then follow bellow example: <strong>Example:</strong> <pre class="prettyprint lang-php"> if(file_exists('./upload/flower.jpg')){ print_r('Image is exist.'); }else{ print_r('Image is not exist.'); } </pre>

By Hardik Savani | April 26, 2016 | | 763 Viewer | Category : PHP
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 | | 8324 Viewer | Category : Laravel
READ MORE

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

If you are new in laravel 5 and you want to determine email is exist or not then you can do it easily. IF you did use code php then we have to write long code and check but laravel provide it's own query builder so it is pretty easy. you can see following example how i check row is exists or not: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> $user = User::where('email',Input::get('email'))->first(); if (is_null($user)) { print_r("email is exists"); } print_r("email is not exists"); </pre>

By Hardik Savani | April 13, 2016 | | 15676 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 | | 1363 Viewer | Category : Laravel
READ MORE

    How to implement flash messages in PHP Codeigniter?

    How to implement flash messages in PHP Codeigniter?

    Open Post

    How to install laravel in your Android Phone

    How to install laravel in your Android Phone

    Open Post

    Codeigniter 3 - CRUD(Create, Read, Update and Delete) using JQuery Ajax, Bootstrap, Models and MySQL

    Codeigniter 3 - CRUD(Create, Read, Update and Delete) using JQuery Ajax, Bootstrap, Models and MySQL

    Open Post

    How to remove # from URL in AngularJS?

    How to remove # from URL in AngularJS?

    Open Post

    Paytm payment gateway integration example in Laravel 5

    Paytm payment gateway integration example in Laravel 5

    Open Post

    How to create ban/revoke user functionality in Laravel 5 example ?

    How to create ban/revoke user functionality in Laravel 5 example ?

    Open Post