Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 从Laravel表单中删除角度值_Php_Angularjs_Laravel - Fatal编程技术网

Php 从Laravel表单中删除角度值

Php 从Laravel表单中删除角度值,php,angularjs,laravel,Php,Angularjs,Laravel,我有一个名为shop的角度模块和名为CartCtrl的控制器: 在模板中,我有: <div class="modal-body" ng-module="shop" ng-controller="CartCtrl"> {!! Form::model(Auth::user()->profile, [ 'route' => 'order.send'], [ 'id'=>'order_form']) !!} <div class="form-g

我有一个名为shop的角度模块和名为CartCtrl的控制器:

在模板中,我有:

   <div class="modal-body" ng-module="shop" ng-controller="CartCtrl">
      {!! Form::model(Auth::user()->profile, [ 'route' => 'order.send'], [ 'id'=>'order_form']) !!}
   <div class="form-group">
       {!! Form::text('name', old('name'), ['class'=>'form-control', 'placeholder'=>'Ваше имя', 'ng-model'=>'order_name']) !!}

   </div>
   <div class="form-group">
       {!! Form::text('phone', old('phone'), ['class'=>'form-control', 'placeholder'=>'Ваш телефон', 'ng-model'=>'order_phone']) !!}
   </div>
      {!! Form::close() !!}

  </div>
但是当我转到页面并查看表单时,它是空的。但如果我拿走:ng模块=车间ng控制器=CartCtrl,一切都会好起来。为什么呢

UPD:


如果我删除ng模型,它将是相同的,输入has中的值将是空的

,因为您在这里将值初始化为null order_name=null,在这里order_phone=null,您期望什么???@Maraboc,我在那里放它?什么?我说你第一次在表单中期望什么?我期望Auth::user->profile->name and Auth::user->profile->phone values在CartCtrl中有没有提交表单的方法?
   <div class="modal-body" ng-module="shop" ng-controller="CartCtrl">
      {!! Form::model(Auth::user()->profile, [ 'route' => 'order.send'], [ 'id'=>'order_form']) !!}
   <div class="form-group">
       {!! Form::text('name', old('name'), ['class'=>'form-control', 'placeholder'=>'Ваше имя', 'ng-model'=>'order_name']) !!}

   </div>
   <div class="form-group">
       {!! Form::text('phone', old('phone'), ['class'=>'form-control', 'placeholder'=>'Ваш телефон', 'ng-model'=>'order_phone']) !!}
   </div>
      {!! Form::close() !!}

  </div>