public function __construct(User $users) { $this->users = $users; parent::__construct(); //otherwise the middleware won't be applied }
public function __construct(Page $pages) { $this->pages = $pages; parent::__construct(); }