37 lines
No EOL
895 B
PHP
Executable file
37 lines
No EOL
895 B
PHP
Executable file
<?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);
|
|
|
|
|
|
|
|
}
|
|
} |