PHP code example of tanmo / permission-plus

1. Go to this page and download the library: Download tanmo/permission-plus 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/ */

    

tanmo / permission-plus example snippets


composer 

php artisan admin:import Tanmo\Dcat\Permission\Permission

/**
 * @Module(name="文章管理", slug="posts")
 * @Permission(name="文章列表", slug="posts-list", action="index")
 * @Permission(name="新建文章", slug="posts-create", action="create")
 * @Permission(name="保存文章", slug="posts-store", action="store")
 * @Permission(name="编辑文章", slug="posts-edit", action="edit")
 * @Permission(name="保存编辑", slug="posts-update", action="update")
 * @Permission(name="删除文章", slug="posts-destroy", action="destroy")
 */

$router->resource('posts', 'PostController'); // 没有添加路由无法被扫描出来