Method Illuminate\Database\Eloquent\Collection
$users = $users->except([1, 2, 3]);
Method Illuminate\Database\Eloquent\Collection
$users = $users->except([1, 2, 3]);
Method Illuminate\Database\Eloquent\Collection
$users = User::all();
$user = $users->find(1);
Method Illuminate\Database\Eloquent\Collection
$users->contains(1);
$users->contains(User::find(1));
Method Illuminate\Database\Eloquent\Collection
$users->load('comments', 'posts');
$users->load('comments.author');
Method Illuminate\Database\Eloquent\Collection
$users = App\Models\User::where('active', 1)->get();
foreach ($users as $user) {
echo $user->name;
}
Method Illuminate\Database\Eloquent\Collection
use App\Models\User;
$users = $users->diff(User::whereIn('id', [1, 2, 3])->get());
Method Illuminate\Database\Eloquent\Collection
$users = $users->fresh();
$users = $users->fresh('comments');
Method Illuminate\Database\Eloquent\Collection
$users = App\Models\User::all();
$names = $users->reject(function ($user) {
return $user->active === false;
})
->map(function ($user) {
return $user->name;
});
Method Illuminate\Database\Eloquent\Collection
use App\Models\User;
$users = $users->intersect(User::whereIn('id', [1, 2, 3])->get());
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us