diff --git a/app/Helpers/helpers.php b/app/Helpers/helpers.php index 349fbe14..c19836bf 100644 --- a/app/Helpers/helpers.php +++ b/app/Helpers/helpers.php @@ -30,12 +30,17 @@ if(!function_exists('main_categories')){ if(!function_exists('venues_list')){ function venues_list(){ - return \App\Models\Venue::where('active',1)->pluck('venue_name_ru','id'); + return \App\Models\Venue::select('venue_name_ru','id') + ->where('active',1) + ->pluck('venue_name_ru','id'); } } if(!function_exists('sections_list')){ function sections_list($venue_id){ - return \App\Models\Section::where('venue_id',$venue_id)->pluck('section_no','id'); + return \App\Models\Section::select('id','section_no_ru') + ->where('venue_id',$venue_id) + ->where('active',1) + ->pluck('section_no_ru','id'); } } diff --git a/app/Models/Section.php b/app/Models/Section.php index e0514aa5..3ecca967 100644 --- a/app/Models/Section.php +++ b/app/Models/Section.php @@ -20,7 +20,9 @@ class Section extends Model // protected $primaryKey = 'id'; public $timestamps = false; // protected $guarded = ['id']; - protected $fillable = ['section_no','description','venue_id','seats','section_image']; + protected $fillable = ['section_no','section_no_ru','section_no_tk', + 'description','description_ru','description_tk', + 'venue_id','seats','section_image']; // protected $hidden = []; // protected $dates = []; protected $casts = ['seats' => 'array']; diff --git a/resources/views/ManageEvent/Partials/EditEventForm.blade.php b/resources/views/ManageEvent/Partials/EditEventForm.blade.php index 6ac22538..a75b4ee6 100644 --- a/resources/views/ManageEvent/Partials/EditEventForm.blade.php +++ b/resources/views/ManageEvent/Partials/EditEventForm.blade.php @@ -53,7 +53,7 @@ 'class'=>'form-control editable', 'rows' => 5 )) !!} - +
{!! Form::label('description_tk', trans("Event.event_description_tk"), array('class'=>'control-label')) !!} {!! Form::textarea('description_tk', Input::old('description_tk'), @@ -62,7 +62,7 @@ 'rows' => 5 )) !!}
-
+
{!! Form::label('venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!} {!! Form::select('venue_id',venues_list(), Input::old('venue_id'), ['class' => 'form-control','id'=>'venue_name']) !!} {{--{!! Form::label('name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}--}} @@ -90,7 +90,7 @@ {{--{!! Form::hidden('locality', $event->location_address_line_1, ['class' => 'location_field']) !!}--}} {{--
--}} {{----}} - +