Sunday, April 16, 2017

Error while using yield in Form:text value

1) Making CRUD so wanted to use yield in value in Form:text to load the values

{!! Form::Text('employeeName_txt',
'@yield('editEmployeeName')',
array('class' => 'form-control','placeholder'=>'Employee Name')) !!}

Getting error

FatalErrorException in 2168be22f5078758fb418696bf6815fc3ab642a4.php line 59:
syntax error, unexpected 'editEmployeeName' (T_STRING)

Can anyone please help what is wrong in this & also 2) Which is the best method for CRUD

  • Creating Edit page differently & extending it with create page and yield or section the values

  • Or in create page only, with the use of if else condition do the coding eg: if route name contains edit then method= put ,delete button show etc.



via Sumeet

Advertisement