/** * Create a new controller instance. * * @return void */ public function __construct(Blog $Blog) { $this->middleware('auth', ['except' => ['index', 'show']]); $this->middleware('admin', ['only' => ['create', 'edit', 'update', 'destroy']]); $this->Blog = $Blog; $this->Blogs = $Blog->blogs(); }
/** * Create a new controller instance. * * @return void */ public function __construct(Blog $Blog) { $this->Blog = $Blog->blogs(); }