Skip to content

Controller getIndex() on trailing slash #807

Closed
@KaneCohen

Description

@KaneCohen

I'm not sure if this is by design or just a bug, but let's say i have following setup:

// routes
Route::contoller('posts', 'PostController')

// PostController
class PostController extends Controller
{
    public function getIndex()
    {
        return 'Posts Index!';
    }
}

Now, if i load example.com/posts - everything works fine.
If i load example.com/posts/ - Laravel will throw an exception/404 error while trying to load missingMethod().

Is this correct behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions