title: Check if laravel model got saved or query got executed
body: <p>I've seen alot of people using this way to check if a laravel model got saved. So now I wonder if it is a safe way.</p>
  
  <p>And also can I check if the queries bellow got executed like this</p>
  
  <p><strong>Check if model got saved</strong> </p>
  
  <p>Eg:</p>
  
  <pre><code>$myModel = new User();
  
  $myModel-&gt;firstname = Input::get('firstname');
  $myModel-&gt;lastname = Input::get('lastname');
  
  $myModel-&gt;save();
  
  //Check if user got saved
  if ( ! $myModel-&gt;save())
  {
    App::abort(500, 'Error');
  }
  
  //User got saved show OK message
  return Response::json(array('success' =&gt; true, 'user_added' =&gt; 1), 200);
  </code></pre>
  
  <p><em>Is the above a safe way to check whenever my model got saved or not?</em></p>
  
  <p><strong>Check if query returned a result</strong></p>
  
  <p>Eg:</p>
  
  <pre><code>$UserProduct = Product::where('seller_id', '=', $userId)-&gt;first();
  
  if (! $UserProduct)
  {
      App::abort(401); //Error
  }
  </code></pre>
  
  <p><em>Does above return an error if no product where found?</em></p>
  
  <p><strong>Check if query got executed</strong></p>
  
  <p>Eg:</p>
  
  <pre><code>$newUser = User::create([
          'username' =&gt; Input::get('username'),
          'email' =&gt; Input::get('email')
  ]);
  
  //Check if user was created
  if ( ! $newUser)
  {
      App::abort(500, 'Some Error');
  }
  
  
  //User was created show OK message
  return Response::json(array('success' =&gt; true, 'user_created' =&gt; 1), 200);
  </code></pre>
  
  <p><em>Does above check if a user was created?</em></p>