草庐IT

routeCollection

全部标签

php - Laravel 中 RouteCollection.php 中的 NotFoundHttpException

路由文件Route::get('/home','HomeController@index')->name('home');Route::get('/',['as'=>'/','uses'=>'LoginController@getlogin']);Route::post('/Login',['as'=>'Login','uses'=>'LoginController@postLogin']);Route::get('/login',array('as'=>'login','uses'=>'LoginController@getLogin'));Route::group(['middle

php - Laravel5:Redirect::to() 外部链接 RouteCollection.php 中的 NotFoundHttpException

我正在开发Laravel5应用程序,我有这条路线Route::get('/go','UrlController@index');在这个UrlController.php中,我有这个索引方法publicfunctionindex(){returnRedirect::to('www.google.com',302);}当我测试这个urlhttp://localhost:8000/go它只是更改为http://localhost:8000/www.google.com并出现此错误RouteCollection.phpline161中的NotFoundHttpException那么问题是什么,

php - 如何从 Laravel 5 中的模块/目录获取路由列表?

我在app文件夹中有3个模块,例如:用户模块、角色模块和权限模块。此外,我在每个模块中都有不同的route.php文件。现在我需要从用户模块获取路由列表。我使用这段代码得到了所有模块的完整列表:$routeCollection=Route::getRoutes();foreach($routeCollectionas$value){echo$value->getPath()."";}我想获取来自特定模块或特定目录的路由列表作为用户模块,而不是所有路由。如何获取特定文件夹/模块/文件的路由列表? 最佳答案 如果您在要查找的路由中使用相

asp.net - Aps.Net 4.0 网络表单路由有效但没有避免 css jpg js 文件

正如标题,我已经实现了路由并且工作正常,但是CSSjs和jpg文件的路径是错误的。我包含了库System.Web.Routing并且它正确地出现在web.config中从我写的标记中的home.aspx开始在以CSS开头的global.asax中,我在浏览器的开发工具中收到404错误到我所有本地链接(jpg、css、js)导致路由:http://mysyte.com/search/shoese/style.css代替:http://mysyte.com/style.css如您所见,有一些注释行,我已经尝试了所有这些行,但得到的结果相同,路径错误(404)。SubApplication_

php - RouteCollection.php 中的 NotFoundHttpException 第 161 行 : in laravel 5

我知道这是关于堆栈溢出的一个非常常见的问题,我尝试了其中的几个,但它在我的场景中不起作用。我的CollectionController看起来像这样。middleware('role:collector');//replace'collector'withwhateverroleyouneed.}publicfunctiongetHome(){$empid=Auth::user()->empid;$invoice=Invoice::where('Status','=',1)->orderBy('Id','desc')->get();returnView('collectionmodule

php - Laravel 5 MethodNotAllowedHttpException 在 RouteCollection.php 行 201 :

我的项目中有很多php文件:admin.blade.php:此文件包含管理表单。调用时显示以下错误:MethodNotAllowedHttpExceptioninRouteCollection.phpline201PleaseLogInToManage">UserName:Password:在route.php中,调用如下:Route::get('/admin',array('uses'=>'student@admin'));这是student.php中的函数publicfunctionadmin(){returnView::make('student.admin');$validat

php - RouteCollection.php 第 219 行中的 MethodNotAllowedHttpException

当我存储帖子时出现此错误MethodNotAllowedHttpExceptioninRouteCollection.phpline219:什么会导致这个问题??路由.php:Route::get('home','PostsController@index');Route::get('/','PostsController@index');Route::get('index','PostsController@index');Route::get('posts','PostsController@index');Route::get('post/{slug}/{id}','PostsC

php - RouteCollection.php 第 219 行中的 MethodNotAllowedHttpException

当我存储帖子时出现此错误MethodNotAllowedHttpExceptioninRouteCollection.phpline219:什么会导致这个问题??路由.php:Route::get('home','PostsController@index');Route::get('/','PostsController@index');Route::get('index','PostsController@index');Route::get('posts','PostsController@index');Route::get('post/{slug}/{id}','PostsC

php - RouteCollection.php 中的 NotFoundHttpException 第 161 行 : laravel 5. 3

在laravel中,我试图链接到一个特定的页面,但它正在显示NotFoundHttpExceptioninRouteCollection.phpline161:这是我的代码,请帮我找出错误在我看来:{{link_to_route('deleteFile','Delete',[$file->resid])}}在route:Route::get('/deleteFile/{$id}',['as'=>'deleteFile','uses'=>'FilesController@deleteFile']);在Controller中:classFilesControllerextendsContr

关于 laravel:我在 RouteCollection.php 第 161 行收到 NotFoundHttpException:

IamgettingNotFoundHttpExceptioninRouteCollection.phpline161:当我在http://localhost/myproject/public/vendor运行它时出现此错误以下是我的路线:12Route::get('vendor',array('as'=>'vendorform','uses'=>'VendorController@create'));Route::post('vendor',array('as'=>'saveVendor','uses'=>'VendorController@store'));这是我在VendorContro
12