1
I’m in trouble: I’m editing a site and Laravel’s view is only working on /
and when I put another guy http://localhost/blog/public/Termos
she gives as if she had not found
codig routes:
Route::get('/', 'SiteController@index');
Route::get('/Contato', 'SiteController@Contrat');
Route::get('/Dicas', 'SiteController@Dicas');
Route::get('/Regulamento', 'SiteController@Regulamento');
Route::get('/Termos', 'SiteController@Termos');
Route::get('/Tutorial', 'SiteController@Tutorial');
Route::get('/Cadastro', 'SiteController@Cadastro');
sitecontroller code:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SiteController extends Controller
{
public function index(){
return view('/site.Home.index') ;
}
public function Contrato(){
return view('/site.Contrato.index') ;
}
public function Dicas(){
return view('/site.Dicas.index') ;
}
public function Regulamento(){
return view('/site.Regulamento.index') ;
}
public function Termos(){
return view('/site.Termos.index') ;
}
public function Tutorial(){
return view('/site.Tutorial.index') ;
}
public function Cadastro(){
return view('/site.Cadastro.index') ;
}
}
Error print q speaks paginanot
The strange thing is that if I change the location of:
public function index(){
return view('/site.Home.index') ;
}
For:
public function index(){
return view('/site.Termos.index') ;
}
he finds the page
and if I do the same procedure on Route::get
and change the command Route::get('/', 'SiteController@index');
for Route::get('/', 'SiteController@Termos');
then he usually finds the stranger who just wants to run the /
Enable Debug in your
.env
so it’s easier to know where the bug is.– Erlon Charles
if it is the
APP_DEBUG
he already istrue
– Cyber Hacker
I didn’t see the route configured
Return view('/site.Termos.index') ;
public/Termos
in your route file and try to take the bar ondeixando apenas
Return view('site.Termos.index') ;`– adventistaam
Then try to access with
http://localhost/blog/Termos
– adventistaam
@adventistaam took and continues to find
– Cyber Hacker
@adventistaam se tentar acesso igual vc falou ele da objeto n encontrado
– Cyber Hacker
Take the la bar from inside the file
index.blade.php
of the briefcaseTermos
in line extends also– adventistaam
@adventistaam yes I took left as you said and he continues n finding,and equal informed on my last update if I change place he thinks, he is only finding the pastra / the rest he is not finding
– Cyber Hacker
You took the bar from both the controller and the view Blade file?
– adventistaam
Yes, I did as you informed me
– Cyber Hacker
Has how to show what debug displays?
– adventistaam
what has in
templede1
?– adventistaam
@adventistaam n I’m managing to give Debugbar he n is returning nothing and tmplede1 only has the body of html and @Yield('body')
– Cyber Hacker
you have the code on github ?
– adventistaam
What I’ve noticed is that he’s not even in
public function Termos(){ }
because if I put the same Return view'/site.Termos.index'
inpublic function Index(){ }
it finds file and shows normally– Cyber Hacker
try to put only one
echo 'Pagina termos';
in the Terms function and try to access– adventistaam
as I reported in the comment above he does not want to find the Function terms he is only finding the main Function
– Cyber Hacker
I’m installing here to do this test
– adventistaam
mano mo estranho pq igual informi se eu trocar a Return view da Function index() pela Return view da Function Terms ele acha a pagina
– Cyber Hacker
and if I do the same procedure on
Route::get
and change the commandRoute::get('/', 'SiteController@index');
forRoute::get('/', 'SiteController@Termos');
then he usually finds the stranger who just wants to run the /– Cyber Hacker
You already accessed the . htaccess file in the public folder and placed the line
RewriteBase /blog
belowRewriteEngine On
?– adventistaam
'Cause the way I told you here in mine worked
– adventistaam
@adventistaam put what you spoke Rewritebase /blog and now only of the object n found
– Cyber Hacker
Checks whether this line in apache httpd.conf is uncommented:
LoadModule rewrite_module modules/mod_rewrite.so
– adventistaam
I restarted the machine here and Dérrepende worked normally q loco
– Cyber Hacker
Thanks @adventistaam for the attention you gave me
– Cyber Hacker
Tamu together! Glad it worked
– adventistaam