TIP 83 / 100

Check for Specific Model Was Created or Found.

If you want to check for specific model was created or found, use wasRecentlyCreated model attribute.

php
$user = User::create([
    'name' => 'Oussama',
]);

// return boolean
return $user->wasRecentlyCreated;

// true for recently created
// false for found (already on you db)