I want to allow users to CRUD only posts they own. I would like not to create a new middleware, but to leverage the existing ones instead. So, Can Entrust's default middlewares be extended to fit this purpose?
class PostsController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('role:blogger|owner'); // <--
}
...
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1N3EVkj
via IFTTT
Aucun commentaire:
Enregistrer un commentaire