Not quite sure what you mean...
$var->id is set as {examples}, and for 'id' => 'exampleupdateform' try using Form::hidden();
Or is the actual url http://localhost/examples/{examples} after submitting?
In that case is your route set as
Route::post('examples/{examples}, ['as' => 'examples.update', 'uses' => 'ExampleController@someMethod']);
I have this in my routes file:
Route::resource('examples', 'ExampleController');
Th code I posted literally submits the data to http://localhost/examples/{examples}. It should redirect to $var->id
, which I have set for testing purposes as 1
.
Also, I need the form to have an id.
Yeah the 'id' part is a big fail on my part... Seems like I need a break.
But from what I see it should work.. what does the rendered form action look like? Maybe try setting method => put
Wow, I needed a break too...
When I came back to the computer and saw your last post, I saw exactly what was wrong. I had been using the same for for both the create
and edit
methods, using an if statement to change the Form::open
line. Well, turns out I had the above code for the create method, not the edit method.
Thank you for the help though. :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community