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 | | 5044 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 | | 4851 Viewer | Category : PHP
READ MORE

    Laravel 5 Facebook authentication using Socialite Package

    Laravel 5 Facebook authentication using Socialite Package

    Open Post

    PHP - import excel file into mysql database tutorial

    PHP - import excel file into mysql database tutorial

    Open Post

    Laravel 5 - line chart example code using google charts API

    Laravel 5 - line chart example code using google charts API

    Open Post

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Open Post

    How to get gravatar image from email using Jquery?

    How to get gravatar image from email using Jquery?

    Open Post