laravel setappends code example
Example: laravel set appends
return $user->append('is_admin')->toArray();
return $user->setAppends(['is_admin'])->toArray();
return $user->append('is_admin')->toArray();
return $user->setAppends(['is_admin'])->toArray();