phpvms/app/Http/Controllers/Api/SettingsController.php
2018-01-06 15:41:23 -06:00

29 lines
618 B
PHP

<?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Repositories\SettingRepository;
use App\Http\Resources\Setting as SettingResource;
class SettingsController extends RestController
{
protected $settingRepo;
public function __construct(SettingRepository $settingRepo) {
$this->settingRepo = $settingRepo;
}
/**
* Return all the airlines, paginated
*/
public function index(Request $request)
{
$settings = $this->settingRepo
->orderBy('order', 'asc')->get();
return SettingResource::collection($settings);
}
}