16 lines
399 B
PHP
16 lines
399 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\Api;
|
||
|
|
|
||
|
|
use App\Models\DocumentCategory;
|
||
|
|
use App\Transformers\CategoryTransformer;
|
||
|
|
|
||
|
|
class DocumentCategoryController extends ApiController
|
||
|
|
{
|
||
|
|
public function index()
|
||
|
|
{
|
||
|
|
$categories = DocumentCategory::orderBy('lft', 'desc')->get();
|
||
|
|
return $this->respondWithCollection($categories, new CategoryTransformer($this->locale, 'trading'));
|
||
|
|
}
|
||
|
|
}
|