Natinality, Country, Agenda, search Request. CMS

Magazine Content
This commit is contained in:
Kevin Adametz 2019-03-19 15:47:23 +01:00
parent 30d5ca3b44
commit aebfb0586a
72 changed files with 4636 additions and 590 deletions

View file

@ -7,6 +7,7 @@ use App\Models\DraftType;
use App\Models\IndustrySector;
use App\Models\Interest;
use App\Models\TravelClass;
use App\Models\TravelCountry;
use App\Models\TravelProgram;
use Form;
@ -141,6 +142,18 @@ class HTMLHelper
return $ret;
}
public static function getTravelCountriesOptions($countryId = false){
$options = TravelCountry::where('active_backend',1)->get();
$ret = '';
foreach ($options as $option){
$attr = ($option->crm_id === $countryId) ? 'selected="selected"' : '';
$ret .= '<option value="'.$option->crm_id.'" '.$attr.'>'.$option->name.'</option>\n';
}
return $ret;
}
public static function getWeekdaysOptions($programId = false, $weekdays = []){
if($programId){
$tp = TravelProgram::findOrFail($programId);