Last active
January 30, 2018 16:14
-
-
Save pedroufv/75183686a03b2e495a1622ddd8abcc90 to your computer and use it in GitHub Desktop.
AdminiController verificando permissão larapacks/authorization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Admin; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Support\Facades\Route; | |
class AdminController extends Controller | |
{ | |
public function __construct() | |
{ | |
$this->middleware('auth'); | |
$this->middleware('permission:'.Route::currentRouteName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment