0
我爲我的項目使用了laravel 5.3。我有一個面板bootstrap,有一些在這個車。每個購物車都有一些功能。我想定義一個購物車類,並使用jquery按鈕創建新的對象。 我是laravel的新人。 我發現,我可以使用@include在我的代碼中使用購物車,但我不能改變參數。 我該怎麼做? Main.blade.php:在laravel中創建類和對象5.3
<div class="col-md-6">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#AddGorohkary">add</button>
</div>
<div class="row" >
<div class="col-md-12" >
<ul class="horizontal-slide" dir="ltr" >
@include("Panel")
</ul>
</div>
</div><!-- row -->
Panel.blade.php:
<li class="col-md-3" >
<div class="panel panel-primary" >
<div class="panel-heading">
<div class="row">
<div data-toggle="tooltip" data-placement="bottom" title="حذف این گروه کاری" class="col-md-1 col-sm-1 col-xs-1 col-lg-1 col-md-offset-1">
<button onclick=" remove_entry($(this).parent().parent().parent().parent());" style="color: black;" type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div data-toggle="tooltip" data-placement="bottom" title="تنظیمات" class="col-md-1 col-sm-1 col-xs-1 col-lg-1">
<span data-toggle="modal" data-target="#SettingModal" dir="rtl" style="color: black;" class=" glyphicon glyphicon-cog " aria-hidden="false"></span>
</div>
<div data-toggle="tooltip" data-placement="bottom" title="باز کردن صفحه گروه کاری" class="col-md-1 col-sm-1 col-xs-1 col-lg-1">
<a style="color: black;" href='/SpecialGoruhKary'><span class='glyphicon glyphicon-export' aria-hidden="false"></span></a>
</div>
<div data-toggle="tooltip" data-placement="bottom" title="اضافه کردن دانش آموز جدید" class="col-md-1 col-sm-1 col-xs-1 col-lg-1">
<span style="color: green;" class="glyphicon glyphicon-plus" aria-hidden="false"></span>
</div>
<div class="col-md-5 col-sm-5 col-xs-5 col-lg-5">
<span>@yield("GorohKarbariName")</span>
</div>
</div>
</div>
<div class="panel-body" style=" overflow-y: scroll;" >
@yield("table_body")
</div>
</div>
</li>
<!---------------------------------- Modal ---------------------------------------------------->
<div id="SettingModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div dir="rtl" class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title ">مشخصات این گروه کاری</h4>
</div>
<div class="modal-body">
<form dir="rtl" class="form-horizontal" action="{{ url('image-upload') }}" enctype="multipart/form-data" method="post" id="viewGorohkaryForm" >
{{ csrf_field() }}
<!-- Text input-->
<div class="form-group">
<div class="col-md-5 col-md-offset-3 inputGroupContainer">
<div dir="ltr" class="input-group">
<input dir="rtl" id="GorohKaryName" name="GorohKaryName" placeholder="اسم گروه کاری" class="form-control" type="text">
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
</div>
</div>
<label for="GorohKaryName" class="col-md-2 control-label">اسم گروه کاری <span style="color: red">*</span> </label>
</div>
<!-- Text input-->
<div class="row col-md-offset-3">
<div class="form-group col-md-3">
<div class=" inputGroupContainer">
<div class=" clockpicker" data-placement="left" data-align="top" data-autoclose="true">
<div dir="ltr" class="input-group">
<input id="ValidTime" type="text" class="form-control" value="08:00">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</div>
</div>
</div>
<div class="form-group col-md-4 ">
<div class=" inputGroupContainer">
<div dir="ltr" class="input-group col-md-offset-1">
<select style="direction: rtl;" class="form-control" id="day" name="day" required="required">
<option value="" data-hidden="true">روز هفته</option>
<option value="0">شنبه</option>
<option value="1">یکشنبه</option>
<option value="2">دوشنبه</option>
<option value="3">سه شنبه</option>
<option value="4">چهارشنبه</option>
<option value="5">پنجشنبه</option>
<option value="6">جمعه</option>
</select>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>
<div class="form-group col-md-2">
<div class=" inputGroupContainer">
<div dir="ltr" class="input-group">
<button type="button" class="btn btn-info btn-sm">
<span class="glyphicon glyphicon-plus"></span>
</button>
</div>
</div>
</div>
<label for="ValidTime" class="col-md-2 control-label" >زمان معتبر<span style="color: red">*</span> </label>
</div><!-- row clock-->
</form>
</div><!---modal body--->
<div class="modal-footer">
<button id="CreateNewGorohkary" type="submit" class="btn btn-warning" data-dismiss="modal">ذخیره <span class="glyphicon glyphicon-save"></span></button>
</div>
</div><!-- modal content-->
</div>
</div>