NotFoundHttpException
全部标签 当用户将站点语言切换为非英语时,我的Yii2应用程序(基于app-basic方案)仍然显示异常的英文标题,例如NotFoundHttpException。任何其他页面元素都已正确翻译。异常标题存储在哪里?我该如何解决这个问题?我尝试搜索异常类(NotFoundHttpException>HttpException>UserException>Exception)但一无所获。我浏览了基于翻译的文件,发现/vendor/yiisoft/yii2/messages/文件只有Therequestedview"{name}"wasnotfound.和找不到页面。翻译字符串。没有NotFound或
我在RouteServiceProvider中有代码:$router->bind('user',function($value){try{throw(new\Symfony\Component\HttpKernel\Exception\NotFoundHttpException);}catch(Exception$e){exit('nott');}});我没有得到输出nott我得到了Sorry,thepageyouarelookingforcouldnotbefound.NotFoundHttpExceptioninRouteServiceProvider.phpline75:...编
我正在使用Laravel5作为Ionic应用程序的API,它似乎几乎可以正常工作,但我在Laravel中的测试路线Route::group(['prefix'=>'api'],function(){Route::any('user',function(){return'HelloAnonymousUser';});});当我打http://localhost:8000/api/user应该只返回“HelloAnonymousUser”,但由于切换到Homestead而不是使用artisanserve现在会抛出此错误:Sorry,thepageyouarelookingforcouldn
路由文件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
我正在开发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那么问题是什么,
我在使用Laravel4进行测试时遇到了一件非常奇怪的事情。它看起来像是一个错误,但可能有一个合乎逻辑的解释。我已经在干净的Laravel安装中复制了“错误”,这是我的代码:我的资源Controller/app/controllers/TestController.php:(使用phpartisancontroller:makeTestController创建)classTestControllerextends\BaseController{/***Displayalistingoftheresource.**@returnResponse*/publicfunctionindex(
我已经安装了Symfony2,修复了文件权限后,我可以通过将浏览器指向以下地址来访问开发环境:http://localhost/app_dev.php但是,当我尝试通过将浏览器指向http://localhost来访问生产环境时,出现以下异常(来自app/logs/prod.log):[2012-08-1311:30:03]request.ERROR:Symfony\Component\HttpKernel\Exception\NotFoundHttpException:Noroutefoundfor"GET/"(uncaughtexception)at/path/to/framewo
我使用vue.js和Laravel5.1创建了一个小型文件共享应用程序。一切都很完美,但现在我想确保每个文件的所有者能够从他的文件中删除用户(当然,他首先必须与这些用户共享文件),因此我向一个PUT请求名为/files/share的URL。我的Laravel路由如下所示:Route::put('/files/share','FileController@test');当我运行phpartisanroute:list时,它也会被列出。客户端代码如下所示:this.$http.put('/files/share',{some_data},function(data){if(data.err
我收到此错误消息:Controller.php第269行中的NotFoundHttpException:找不到Controller方法。谁能帮我解决这个错误信息?这是与错误消息相关的所有代码:HomeController.phppublicfunctionpostSeo(Request$request){$data=array('meta_title'=>$request->get('meta_title'),'meta_keyword'=>$request->get('meta_keyword'),'meta_description'=>$request->get('meta_des
我知道这是关于堆栈溢出的一个非常常见的问题,我尝试了其中的几个,但它在我的场景中不起作用。我的CollectionController看起来像这样。middleware('role:collector');//replace'collector'withwhateverroleyouneed.}publicfunctiongetHome(){$empid=Auth::user()->empid;$invoice=Invoice::where('Status','=',1)->orderBy('Id','desc')->get();returnView('collectionmodule