Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller getIndex() on trailing slash #807

Closed
KaneCohen opened this issue Apr 2, 2013 · 3 comments
Closed

Controller getIndex() on trailing slash #807

KaneCohen opened this issue Apr 2, 2013 · 3 comments

Comments

@KaneCohen
Copy link
Contributor

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?

@andrewryno
Copy link
Contributor

Also see: #23 #58 and more recently https://github.com/laravel/laravel/issues/1834

@KaneCohen
Copy link
Contributor Author

@andrewryno, thanks, i see that's quite an issue. Doesn't seem to be fixed.

@taylorotwell
Copy link
Member

Duplicate.

gonzalom pushed a commit to Hydrane/tmp-laravel-framework that referenced this issue Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants