PHP code example of lathe / permission
1. Go to this page and download the library: Download lathe/permission library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lathe / permission example snippets
Lathe::registerPlugins(PermissionPlugin::make()->withDefaultPolicies());
Lathe::registerPlugins(
PermissionPlugin::make()
->useRolePolicy(RolePolicy::class)
->usePermissionPolicy(PermissionPolicy::class),
);
bash
composer vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate