17 nov 2018
This commit is contained in:
parent
0c9a118281
commit
765d6a2f6b
52 changed files with 3200 additions and 229 deletions
37
app/Http/Controllers/API/LoaderController.php
Executable file
37
app/Http/Controllers/API/LoaderController.php
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\BookingDraftItem;
|
||||
use App\Models\Draft;
|
||||
use App\Models\TravelCountry;
|
||||
use App\Models\TravelProgram;
|
||||
use Carbon\Carbon;
|
||||
use HTMLHelper;
|
||||
|
||||
|
||||
class LoaderController extends Controller
|
||||
{
|
||||
public $successStatus = 200;
|
||||
|
||||
|
||||
public function load($action)
|
||||
{
|
||||
if ($action == "travel_program") {
|
||||
$program = TravelProgram::where('status', 1)->get()->pluck('title', 'id');
|
||||
return response()->json(['success' => $program], $this->successStatus);
|
||||
}
|
||||
|
||||
if ($action == "travel_country") {
|
||||
$program = TravelCountry::all()->pluck('name', 'id');;
|
||||
return response()->json(['success' => $program], $this->successStatus);
|
||||
}
|
||||
|
||||
$ret = [];
|
||||
return response()->json(['success' => $ret], $this->successStatus);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue