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
    
    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能