laravel-learn-bbs/app/Http/Controllers/Api/PermissionsController.php
2018-06-11 23:10:59 +08:00

16 lines
327 B
PHP

<?php
namespace App\Http\Controllers\Api;
use App\Transformers\PermissionTransformer;
class PermissionsController extends Controller
{
public function index()
{
$permissions = $this->user()->getAllPermissions();
return $this->response->collection($permissions, new PermissionTransformer());
}
}