public function run()
 {
     Account::create(['name' => 'Acme', 'slug' => 'acme']);
 }
 public function run()
 {
     $user = new User(['email' => '*****@*****.**', 'firstname' => 'Zen', 'lastname' => 'Bot']);
     $user->setPassword('secret');
     Account::first()->users()->save($user);
 }
 /**
  *	Invitation Token
  *	Get related models.
  *
  *	@param	string	$token
  */
 public static function withinvitation($token)
 {
     # Return user and account
     return [User::whereHas('accounts', function ($q) use($token) {
         $q->where('account_user.invitation_token', $token);
     })->first(), Account::whereHas('users', function ($q) use($token) {
         $q->where('account_user.invitation_token', $token);
     })->first()];
 }