Tag : is_null


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

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    Open Post

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

    How to get last inserted id in Codeigniter?

    How to get last inserted id in Codeigniter?

    Open Post

    Laravel 5 Instagram API tutorial with example

    Laravel 5 Instagram API tutorial with example

    Open Post

    How to implement infinite ajax scroll pagination in Laravel 5?

    How to implement infinite ajax scroll pagination in Laravel 5?

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post