doujiang9887 2018-01-11 11:47
浏览 94
已采纳

too long

When I click the update button from my editoffice.blade.php this shows

"Array to string conversion (View: C:\xampp\htdocs\Eguideesources\views\editoffice.blade.php)"

editoffice.blade.php

{!! Form::open(array('route' => ['editoffice', ['id' => $id, 'office_id' => $office->id]], 'class' => 'form')) !!}

this is where the error points to.. How to fix this?

error screenshot enter image description here

THE RESULT WHEN I USE dd($request->all()); in update function

dd($request->all());

Routes

  Route::get('/', 'BuildingController@index')->name('index');

Route::get('building/{id}', 'PageController@show')->name('building');

Route::get('office/{id}', 'OfficeController@show')->name('officeMenu');

Route::get('offices', 'OfficeController@index');

Route::group(['middleware' => ['auth']], function () {

  Route::get('buildings/create', 'BuildingController@create')->name('createbform');

  Route::post('building/create/store', 'BuildingController@saveBuilding')->name('createbuilding');

  Route::get('building/{id}/edit', 'BuildingController@edit');

  Route::post('building/{id}/edit', 'BuildingController@update')->name('editbuilding');

  Route::get('building/{id}/delete', 'BuildingController@destroy');

  Route::get('building/{id}/offices/create', 'OfficeController@create')->name('createofficeform');

  Route::post('building/{id}/offices/create/store', 'OfficeController@store')->name('createoffice');

Route::get('building/{id}/offices/{office_id}/edit', 'OfficeController@edit')->name('editofficeform');

Route::post('building/{id}/offices/{office_id}/edit', 'OfficeController@update')->name('editoffice');


  Route::get('offices/{id}/delete', 'OfficeController@destroy')->name('deleteoffice');
});
  • 写回答

1条回答 默认 最新

  • dongzhuang2030 2018-01-11 11:58
    关注

    Please try this as i think you have wrong syntax for form

    {!! Form::open(array('route' => ['login', 'id' => $id, 'office_id' => $office->id], 'class' => 'form')) !!}
    

    And Create the routes regarding your use

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装