Booking edit v3
This commit is contained in:
parent
6706d28f51
commit
6880c7e989
20 changed files with 691 additions and 97 deletions
32
app/Http/Controllers/AjaxController.php
Normal file
32
app/Http/Controllers/AjaxController.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Services\Model;
|
||||
use Request;
|
||||
|
||||
class AjaxController extends Controller
|
||||
{
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function load(){
|
||||
$data = Request::all();
|
||||
$ret = "";
|
||||
$status = false;
|
||||
if(Request::ajax()){
|
||||
|
||||
if($data['action'] === 'load_travelagenda_by_country' && isset($data['travel_country_id'])){
|
||||
$ret = Model::getTravelAgendaArray(true, $data['travel_country_id']);
|
||||
$status = true;
|
||||
}
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue