| Package Data | |
|---|---|
| Maintainer Username: | giangsoda |
| Maintainer Contact: | giangsoda@gmail.com (Giang Soda) |
| Package Create Date: | 2016-05-11 |
| Package Last Update: | 2016-05-16 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-23 15:00:30 |
| Package Statistics | |
|---|---|
| Total Downloads: | 0 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 1 |
add code to composer.json
"require": {
"gsdw/permission": "0.1.*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/gsdw/permission"
}
],
add providers in config/app.php
Gsdw\Permission\Providers\PermissionServiceProvider::class,
Change User model called to Gsdw\Permission\Models\User
in file config/auth.php:
'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => Gsdw\Permission\Models\User::class ], ]
in file app\Http\Controllers\Auth\AuthController.php
Use this code in migration:
$migrate = new \Gsdw\Permission\Database\Migrate();
$migrate->up();
Create file config/routeas.php, add date for route alias:
return [
'route.alias.name' => 'route custom name',
]
@yield('scriptCode') at before body end tagroute has name prefix is auth. to check validate permission
use class Gsdw\Permission\Helpers\Auth
Flush session when logout \Gsdw\Permission\Helpers\Auth::getSelf()->flushPermission();
public function logout() {
Auth::guard($this->getGuard())->logout();
\Gsdw\Permission\Helpers\Auth::getSelf()->flushPermission();
return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
}