The main question is how to detect an eloquent collection result is empty or not, what laravel suggest to recognize this?
I have two different questions about this, maybe they are related to each other or not,
The first:
How can i get the result of
$result = $user->delete()
OR$result = $user->save();
methods?
I mean check if the operation Done or NOT
Is it correct or sufficient to use if($result){...}
for this?
The second:
What is the correct way to get
$result =User::where(conditions)->get()
is empty or not?
Please show me the correct way that cover all cases,