title: Laravel. Disable observer methods if the database is seeding
body: <p>I have an observer for my User model. Inside my observer-&gt;created event i have some code.</p>
  <pre><code>public function created(User $user)
  {
      sendEmail();
  }
  </code></pre>
  <p>So, the idea is, when a user is created, the system will send for the user email notification that the account was created.</p>
  <p>Question: When the database is seeding, it also calls this method 'created' and sends users (that are in the seeds) email notification.
  So, my question is, how can i check, probably inside this 'created' method if at the moment laravel is seeding data -&gt; do not send email of do not run the 'created' observer method.</p>
  <p>Tried to google, found something, but not working correct.
  Something like <code>YourModel::flushEventListeners();</code></p>