php - Middleware For actions into Controller, Laravel 5.1 -
i have controller have index method, have multiple levels of users have access method, single admin can view records of database how can add middleware select action corresponding user? have next code <?php namespace set\http\controllers; use illuminate\http\request; use illuminate\support\facades\session; use illuminate\support\facades\redirect; use set\http\requests; use set\http\requests\labrequest; use set\http\controllers\controller; use illuminate\routing\route; use set\lab; use validator; use auth; use db; class laboratoriocontroller extends controller { public function __construct(){ $this->beforefilter('@find', ['only' => ['show','edit','update','destroy']]); } public function find(route $route){ $this->laboratorio = lab::findorfail($route->getparameter('laboratorio')); } /** * display listing of resource. * * @return response */ public function index() { $labs = lab::all(); r...