/** * Run the database seeds. * * @return void */ public function run() { foreach (User::all() as $user) { if ($user->frontPageNodes()->isEmpty()) { FrontPageNode::reset($user); } } }
/** * Create a new event instance. * * @return void */ public function __construct(User $user) { $this->user = $user; FrontPageNode::reset($user); }