Example #1
0
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function __construct(Topic $Topic)
 {
     $this->middleware('auth', ['except' => ['index', 'show']]);
     $this->middleware('admin', ['only' => ['edit', 'update', 'destroy']]);
     $this->Topic = $Topic;
     $this->Topics = $Topic->topics();
 }
Example #2
0
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function __construct(Topic $Topic)
 {
     $this->Topic = $Topic->topics();
 }