Current File : //home/tradevaly/public_html/resources/views/backend/pages/package/add_features.blade.php |
@extends('backend.ayaan.master')
@push('title') Dashboard @endpush
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') Add Feature @endslot
@endcomponent
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-icon card-header-info">
<div class="card-icon d-flex justify-items-left">
<i class="fa fa-id-badge "></i>
<h4 class="card-title">Add Feature
</h4>
</div>
</div>
<div class="card-body">
<form action="{{route('admin.package.addfeatured', $id)}}" method="POST" enctype="multipart/form-data">@csrf
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select class="form-control" name="feature_id" onchange="get_status(this.value)" required>
<option value="">{{translate("Select Feature Packages")}}</option>
@foreach(\App\Models\Feature::all() as $feature)
@php
$feature_list = \App\Models\PackageFeature::where('package_id',$id)->where('feature_id',$feature->id)->first();
@endphp
@if (!isset($feature_list))
<option value="{{ $feature->id }}">{{ $feature->name }}
</option>
@endif
@endforeach
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<span id="show_city"></span>
</div>
</div>
<button type="submit" class="btn btn-info mt-5">Upload</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
<script>
function get_status(id){
var url = '{{route("package.getfeature", ":id")}}';
url = url.replace(':id',id);
$.ajax({
url:url,
method:"get",
success:function(data){
$("#show_city").html(data);
}
});
}
</script>
@endsection
@section('script')
<!-- apexcharts -->
<script src="{{ asset('/assets/libs/apexcharts/apexcharts.min.js') }}"></script>
<!-- dashboard init -->
<script src="{{ asset('/assets/js/pages/dashboard.init.js') }}"></script>
<script>
ClassicEditor
.create( document.querySelector( '#editor1' ) )
.catch( error => {
console.error( error );
} );
</script>
@endsection
{{--@extends('backend.layouts.app')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-8">
<div class="card">
<div class="card-header card-header-icon card-header-info">
<div class="card-icon">
<i class="material-icons">add_task</i>
</div>
<h4 class="card-title">{{translate("Add new Features")}}
</h4>
</div>
<div class="card-body">
<form action="{{route('admin.package.addfeatured', $id)}}" method="POST" enctype="multipart/form-data">@csrf
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select class="form-control" name="feature_id" onchange="get_status(this.value)" required>
<option value="">{{translate("Select Feature")}}</option>
@foreach(\App\Models\Feature::all() as $feature)
<option value="{{ $feature->id }}">{{ $feature->name }}</option>
@endforeach
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<span id="show_city"></span>
</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-info pull-right">{{translate("Confirm")}}</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
function get_status(id){
var url = '{{route("package.getfeature", ":id")}}';
url = url.replace(':id',id);
$.ajax({
url:url,
method:"get",
success:function(data){
$("#show_city").html(data);
}
});
}
</script>
@stop
@push('script')
@endpush
--}}