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