Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get unique values in laravel

$users = User::select('name')->distinct()->get();
Comment

get the unique rows from table laravel

$categories = Machine::distinct('category')->pluck('category');


Comment

unique data from eloquent laravel

$users = DB::table('users')
            ->select('id','name', 'email')
            ->groupBy('name')
            ->get();
Comment

PREVIOUS NEXT
Code Example
Php :: add post meta wordpress 
Php :: php datetime to timestamp 
Php :: get cart item by cart item key woocommerce 
Php :: laravel active nav 
Php :: php current date get 
Php :: woocommerce change sale text 
Php :: first item in array php 
Php :: change font family in echo php 
Php :: laravel eloquent get only field name 
Php :: codeigniter form_validation email 
Php :: php ini_set timeout 
Php :: run laravel mix 
Php :: php function to convert string to camelcase 
Php :: laravel add column to existing table 
Php :: php why " " not new line 
Php :: convert string to datetime symfony 
Php :: how count the rout in route.php laravel 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in phar:///usr/local/bin/composer1.phar/src/Composer/DependencyResolver/RuleSet.php on line 8 
Php :: remove decimal php 
Php :: php index of last element in array 
Php :: inner join codeigniter 
Php :: php function exists 
Php :: php validate date format 
Php :: Artisan::call for all catch clear in laravel 
Php :: print url in view yii2 
Php :: current URL without url site laravel 
Php :: php body_class wp 
Php :: laravel instal 
Php :: num_rows in php 
Php :: browser detection php 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =