2022-12-20 07:50:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
|
|
|
|
|
|
use App\Models\DocumentCategory;
|
|
|
|
|
use App\Transformers\CategoryTransformer;
|
|
|
|
|
|
|
|
|
|
class DocumentCategoryController extends ApiController
|
|
|
|
|
{
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
2022-12-24 16:17:57 +00:00
|
|
|
$categories = DocumentCategory::orderBy('lft', 'asc')->get();
|
2022-12-20 07:50:01 +00:00
|
|
|
return $this->respondWithCollection($categories, new CategoryTransformer($this->locale, 'trading'));
|
|
|
|
|
}
|
|
|
|
|
}
|