libressltd / lbtracker
full stack package allow deep permission system
0.2.2.2
2017-04-21 03:00 UTC
Requires
This package is not auto-updated.
Last update: 2025-01-18 20:41:19 UTC
README
Step 1: Install DeepPermission
composer require libressltd/lbtracker
Step 2: Add service provider to config/app.php
//Provider LIBRESSLtd\LBTracker\LBTrackerServiceProvider::class,
Step 3: Publish vendor
php artisan vendor:publish --tag=lbtracker --force php artisan migrate
Step 4: Add following line to App\Http\Kernel > routeMiddleware
'lbtracker' => \App\Http\Middleware\LBTrackerMiddleware::class
Add middleware to any route that you want to track. Remember to put the tracker after auth or auth:api
Route::group(["middleware" => ["lbtracker"]], function() { Route::get('/', function () { return view('welcome'); }); });
or put it on middlewares to make it global
protected $middleware = [ \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, // Middleware for LBTracker \App\Http\Middleware\LBTrackerMiddleware::class, ];