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?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire