MethodNotAllowedHttpException in RouteCollection.php line 233

Posted 1 year ago by ElvinGizWiz

I still new to Laravel and not sure how to fix this error. I tried to have 2 form inside 1 page and both forms do different thing but I end up having this error.

In my views/posts directory, I got create.blade.php and 2 form exists inside it.

First form : {{ Form::open(['route' => 'posts.store', 'files' => true]) }} Second form: {{ Form::open(['route' => array('posts.show',$page = 'show')]) }}

In my postscontroller.php I got

public function create () 
{
    return View::make('posts.create');
}

public function store () 
{
...
}

public function show () 
{
...
}

Lastly, my route

Route::resource('posts','PostsController');

My first form work perfectly fine except my second form. When I click on second form submit button, I end up having "MethodNotAllowedHttpException in RouteCollection.php line 233"

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.