Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to get all rows from a table except some rows in laravel

The 'whereNotIn' method of the DB Facade only accepts an array as second argument
$user = DB::table('users')->whereNotIn('id', [1])->get();
Comment

PREVIOUS NEXT
Code Example
Php :: generating-random-token-php 
Php :: php goto 
Php :: php is day light saving time 
Php :: php artisan services 
Php :: php make array to certain length 
Php :: php déclarer une constante URL 
Php :: truncate table laravel eloquent 
Php :: laravel loop through collection 
Php :: How to check leap year in php? 
Php :: laravel relationship with for single data 
Php :: php get first last loop 
Php :: artisan cache clear 
Php :: php get random value from array 
Php :: laravel get next record 
Php :: php ucwords 
Php :: PHP CSV File Export Using fputcsv() 
Php :: php set x-frame-options 
Php :: php parse html 
Php :: PHP | get client ip 
Php :: relative path php 
Php :: laravel blade get authenticated user email 
Php :: laravel bootstrap nav active 
Php :: php array common element 
Php :: store as real file name laravel uplaod 
Php :: php serverpath 
Php :: rename migration in laravel 
Php :: Laravel Auth Redirect based on role 
Php :: laravel validate max file size 
Php :: php two decimal places 
Php :: how to search two needle in an array in_array php 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =