Laravel Route Stock Problem

I have a problem with Laravel 4 nested routing. I can display the form of the creation method, but I cannot save. Here is the code, I’ll just get to the point. I have a basic resource controller and another nested controller

This is in my Routes.php

Route::resource('profile','ProfileController');
Route::resource('profile.bands','BandsController');

I don’t think I need to display the profile code here, I will show you the BandsController

public function create($profileId)
{
    return View::make('bands.create',['title' => 'Create Band Profile' , 'profileId' => $profileId]);
}

This will simply display the form, as you know. The form:

{{Form::open( [ 'route' => ['profile.bands.create',$profileId]])}}
<input class="input" type="text" name="name" value="" />
<input class="input" type="text" name="city" value="" />
 <input type="submit" value="submit" />
    {{Form::close()}}

Now I do not understand that the form URL looks good when I view it in a browser, but when I submit it, I get this error.

Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

open: E:\server\www\gigmor.com\gigmor\vendor\laravel\framework\src\Illuminate\Routing\Router.php
    // The method not allowed exception is essentially a HTTP 405 error, so we
    // will grab the allowed methods when converting into the HTTP Kernel's
    // version of the exact error. This gives us a good RESTful API site.
    elseif ($e instanceof MethodNotAllowedException)
    {
        $allowed = $e->getAllowedMethods();

        throw new MethodNotAllowedHttpException($allowed, $e->getMessage());
    }
}

What could I do wrong?

+4
source share
1 answer

MethodNotAllowedHttpException , HTTP . POST , GET.

profile.bands.store

.create - , , .

,

php artisan routes
+6

All Articles