Booking edit v3
This commit is contained in:
parent
6706d28f51
commit
6880c7e989
20 changed files with 691 additions and 97 deletions
|
|
@ -1,12 +1,17 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Branch;
|
||||
use App\Models\Status;
|
||||
use App\Models\Salutation;
|
||||
use App\Models\SfGuardUser;
|
||||
use App\Models\Sym\TravelCountry as SymTravelCountry;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Models\TravelCompany;
|
||||
use App\Models\TravelCountry;
|
||||
use App\Models\TravelCategory;
|
||||
use App\Models\ServiceProvider;
|
||||
use App\Models\TravelNationality;
|
||||
use App\Models\Sym\TravelCountry as SymTravelCountry;
|
||||
|
||||
class Model
|
||||
{
|
||||
|
|
@ -27,14 +32,18 @@ class Model
|
|||
|
||||
}
|
||||
|
||||
public static function getTravelAgendaArray($emtpy = false){
|
||||
$TravelAgenda = TravelAgenda::orderBy('name')->get()->pluck('name', 'id');
|
||||
public static function getTravelAgendaArray($emtpy = false, $travelcountry_id = false){
|
||||
if($travelcountry_id){
|
||||
$TravelAgenda = TravelAgenda::where('travelcountry_id', $travelcountry_id)->where('active', true)->orderBy('name')->get()->pluck('name', 'id');
|
||||
}else{
|
||||
$TravelAgenda = TravelAgenda::orderBy('name')->get()->pluck('name', 'id');
|
||||
}
|
||||
return $emtpy ? $TravelAgenda->prepend('-', 0) : $TravelAgenda;
|
||||
}
|
||||
|
||||
public static function getSymTravelCountryArray($emtpy = false){
|
||||
$TravelAgenda = SymTravelCountry::orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $TravelAgenda->prepend('-', 0) : $TravelAgenda;
|
||||
$SymTravelCountry = SymTravelCountry::orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $SymTravelCountry->prepend('-', 0) : $SymTravelCountry;
|
||||
}
|
||||
|
||||
public static function getStatusArray($emtpy = false){
|
||||
|
|
@ -42,5 +51,33 @@ class Model
|
|||
return $emtpy ? $Status->prepend('-', 0) : $Status;
|
||||
}
|
||||
|
||||
public static function getTravelCompanyArray($emtpy = false){
|
||||
$TravelCompany = TravelCompany::where('active', true)->orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $TravelCompany->prepend('-', 0) : $TravelCompany;
|
||||
}
|
||||
|
||||
public static function getBranchArray($emtpy = false){
|
||||
$Branch = Branch::orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $Branch->prepend('-', 0) : $Branch;
|
||||
}
|
||||
|
||||
public static function getServiceProviderArray($emtpy = false, $type='payment'){
|
||||
$ServiceProvider = ServiceProvider::where('type', $type)->orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $ServiceProvider->prepend('-', 0) : $ServiceProvider;
|
||||
}
|
||||
|
||||
public static function getSalutationArray($emtpy = false){
|
||||
$Salutation = Salutation::orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $Salutation->prepend('-', 0) : $Salutation;
|
||||
}
|
||||
|
||||
public static function getTravelNationalityArray($emtpy = false){
|
||||
$TravelNationality = TravelNationality::where('active', true)->orderBy('name')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $TravelNationality->prepend('-', 0) : $TravelNationality;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue