Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel search function

$users = User::has('posts')->withCount('posts')->orderBy('posts_count')->take(50)->get();

$userIndex = $users->search(function($user) {
    return $user->id === Auth::id();
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #search #function
ADD COMMENT
Topic
Name
7+6 =