laravel-learn-bbs/app/Http/Controllers/Api/PermissionsController.php

16 lines
327 B
PHP
Raw Permalink Normal View History

2018-06-11 15:10:59 +00:00
<?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());
}
}