dongze5043 2017-09-03 07:00
浏览 296

Laravel App - 仅限管理员路线'/ admin'将始终返回404错误| '/ admins'或其他任何工作

So if you go here you will see the EXACT SAME ISSUE word for word that i'm having...

Basically I have the admin route set like this:

Route::get('/admin', function () {
    return view('admin.app');
});

Simple enough right? It always returns this error here:

Not Found

The requested URL /admin/ was not found on this server.

If i change the route to /admins (plural) or really anything else, even /test the route displays properly.

I DID have an admin folder inside my public folder, but I have since deleted the admin folder and now the problem is still persisting. I don't really understand why. I'm running on a Laravel/Homestead environment. Basic LEMP stack. Nothing special.

Edit: When i type in mysite.dev:8000/admin it directs me automatically to mysite.dev/admin (Notice there is no port) So, now i'm really even more confused. :/

Edit 2: Changed the route to admin/dashboard works just fine. Could it be possible that Laravel has defined the /admin route as a 'reserved route' or something (similar to reserved keywords in any programming language) to where it won't ever display anything? Is that even a thing?

Route::get('admin/dashboard', function () {
    return view('admin.app');
});

Any ideas?

  • 写回答

2条回答 默认 最新

  • dsshsta97935 2017-09-03 07:16
    关注

    delete or rename admin folder in public and run

    php artisan cache:clear
    
    评论

报告相同问题?

悬赏问题

  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
  • ¥15 NAO机器人的录音程序保存问题
  • ¥15 C#读写EXCEL文件,不同编译
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL