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