Tag : Empty


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

How to remove empty values from array in PHP?

you have array with empty value and you want to remove all empty value from that array without loop. you can remove your all empty value from array without loop. PHP array_filter function through you can remove all empty value, you can do both way try and see following example how to do this : <strong>Example:</strong> <pre class="language-php"> $example = array(100, "hari", "","hey", "", 77, "hello"); $result = array_filter($example, function($value) { return !empty($value); }); print_r($result); <br/> $resultDirect = array_filter($example); print_r($resultDirect); </pre> <strong>Out.....

By Hardik Savani | February 28, 2016 | | 4572 Viewer | Category : PHP
READ MORE

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Open Post

    Crop, Resize, Frames etc on selected image in php using Aviary

    Crop, Resize, Frames etc on selected image in php using Aviary

    Open Post

    PHP - multiple file uploading dropzone js example

    PHP - multiple file uploading dropzone js example

    Open Post

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post

    PHP AngularJS CRUD with Search and Pagination Example From Scratch

    PHP AngularJS CRUD with Search and Pagination Example From Scratch

    Open Post

    How to disable model timestamps in Laravel 5.3?

    How to disable model timestamps in Laravel 5.3?

    Open Post