sections fix
This commit is contained in:
parent
ee51de5838
commit
486316f7d7
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
'class'=>'form-control editable',
|
||||
'rows' => 5
|
||||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
{!! 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
|
||||
)) !!}
|
||||
</div>
|
||||
<div class="form-group address-automatic">
|
||||
<div class="form-group col-md-6 address-automatic">
|
||||
{!! 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']) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<!-- /These are populated with the Google places info-->--}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue