Answers for "laravel query if exists"

PHP
1

limit laravel

$posts = Post::all()->limit(10)->get();
Posted by: Guest on November-22-2020
5

laravel check record exists

$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
   // user doesn't exist
}
Posted by: Guest on April-08-2020
7

laravel not in query

DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Posted by: Guest on September-26-2020
1

if notexists in laravel query

if (User::where('email', '=', Input::get('email'))->exists()) {
   // user found
}
Posted by: Guest on July-23-2020

Browse Popular Code Answers by Language