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 | | 1179 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 | | 4148 Viewer | Category : PHP
READ MORE

    Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

    Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

    Open Post

    Laravel 5 amazon s3 file upload tutorial - Part 1

    Laravel 5 amazon s3 file upload tutorial - Part 1

    Open Post

    How to integrate paypal payment gateway with laravel 5.4

    How to integrate paypal payment gateway with laravel 5.4

    Open Post

    How to remove # from URL in AngularJS?

    How to remove # from URL in AngularJS?

    Open Post

    How to implement infinite ajax scroll pagination in Laravel 5?

    How to implement infinite ajax scroll pagination in Laravel 5?

    Open Post

    Mailgun setup with Laravel 5 example

    Mailgun setup with Laravel 5 example

    Open Post