I am using Laravel 5.6 and trying to create a simple form to create a post. I have my web routes that looks like this..
Route::resource('posts', 'PostsController')->middleware('auth');
My form looks like this...
<form action="" method="POST">
<input name="title" type="text">
</form>
And my PagesController looks like this
public function store(Request $request)
{
$page = new Page;
$title = $request->input('title');
$page->save();
}
But I am getting the following error message..
Route [pages@store] not defined
Where am I going wrong?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NdWD6v
via IFTTT
Aucun commentaire:
Enregistrer un commentaire