php - laravel 5 controller not visible via browser -
I know that Larval 5 is not yet in the developmental stage but I am trying and trying to understand it I do this how it works. Using the Home Controller, I added another method in contact and when I try to view it through the browser, it shows only 404 pages What am I doing wrong? Disabled by default routes and passed through all the controllers.
http://domain.com/home/contact & lt; Php namespace App \ http \ controllers; Use the Illuminated \ Routing \ Controller; Class Home Controller Controller {Public Function Index () {$ data = array ('fname' = & gt; Circman ',' lname '= & gt;' b '); Return view ('pages.home') - & gt; Together ('data', $ data); } Public Work Contacts () {Return 'Contact Us'; }}
In
AP / Provider / Route Service Provider
this line
requires app_path ('hpp / routing.fp');
is commented. So I removed it and put it in my path. Php
$ router-> Receive ('Contact', 'Contact' Home Controller);
And it still does not work.
You should find solutions here and even for a link, not just links: < / P>
From:
You need to specify the full path:
App \ htp \ controllers \ homecounter \ Code> Add either the namespace to the root-service family section, where you need routes. PHP - In this way: Public Function Map (router $ router) {$ router- & gt; Use the group (['namespace'> & gt; $ this-> root URL namespace], function () ($ router) {Requires app_path ('hpp / routing.fp');}); }
Comments
Post a Comment