I've been using Laravel for a while now, although with a new install I did I cannot get the routes POST working, Routes GET works just fine but not post. It keeps throwing a MethodNotAllowedHttpException error. This is my routes
Route::post('/admin/new_event', [
"as" => "admin.event_add",
"uses" => "AdminController@adminEventAddPost"
]);
This is my form
<form action="{{ URL::route("admin.event_add") }}" method="POST">
<input type="text" placeholder="Event Title" name="title"><br/>
<input type="text" placeholder="Event Detail" name="detail"><br/>
<button type="submit" class="btn purp-button">Post</button>
</form>
this is the controller
public function adminEventAddPost()
{
$title = Input::get("title");
$detail = Input::get("detail");
$date = date("Y-m-d");
Events::create([
"title" => $title,
"detail" => $detail,
"date" => $date
]);
return Redirect::route("admin.events_new");
}