RouteDependencyResolverTrait.php第57行中的ReflectionException:内部错误:无法检索默认值

时间:2018-06-06 06:23:07

标签: laravel laravel-5 laravel-5.2

when i click on save button nothing happen but on inspect(network) i found(Internal error: Failed to retrieve the default value)

这是我正在使用的功能 当我点击保存按钮时没有发生但是检查(网络)我发现(内部错误:无法检索默认值)

public function storeRepresentation($request,$company_id){ //ValidateRepresentation $request

dd('dddd');
        if ($request->isMethod('post')) {
           /* $country = $request->input('country');
            $country = implode(',', $country);
            dd($country);*/

            $representation = new Representation();
            /*$representation->store($request->all() , $company_id);*/

            if($representation->id){

//                return redirect()->back();
                return response($company_id, 200)->header('Content-Type', 'text/plain');
            }
        }
//        return response('Error' , 404)->header('Content-Type', 'text/plain');
    }

这是我用来提交表格的路线

Route::post('company/representation/{id}' , ['as' => 'store_company_representation','uses' => 'Admin\CompanyController@storeRepresentation']);

我的观点

当我点击保存按钮时没有发生任何事情,但我发现检查(网络)(内部错误:无法检索默认值)

<form id="representation"  action="{{route('store_company_representation',[$company->id])}}" method="post">
    <div class="col-md-6">

        <div class="form-group">

            <label>Website URL </label>

            <input type="text" name="website_url"  class="form-control"  placeholder="Enter your website url ">

        </div>

   </div>

   {{csrf_field()}}

   <div class="form-wizard-actions">

       <a href="{{route('create_representation',[$company->slug])}}" class="btn btn-success" id="basic-next" type="submit">View All Representation</a>

       <button type="submit" class="btn btn-info" id="basic-next" type="submit">Save</button>

       <a href="{{route('create_profile',[$company->slug])}}" class="btn btn-primary" ><i class="icon-arrow-right14 position-right"></i>Next Key Facts</a>

    </div>

</form>

0 个答案:

没有答案