Php 虽然页面已刷新且url已更改,但页面具有相同的视图。拉威尔5.2
home.blad.phpPhp 虽然页面已刷新且url已更改,但页面具有相同的视图。拉威尔5.2,php,laravel,laravel-5.2,Php,Laravel,Laravel 5.2,home.blad.php @foreach($profiles as $profile) @if(Auth::user()->email == $profile->email && Auth::user()) <a href="{{ url('write') }}" class="write">WRITE</a> @endif @endforeach HomeController.
@foreach($profiles as $profile)
@if(Auth::user()->email == $profile->email && Auth::user())
<a href="{{ url('write') }}" class="write">WRITE</a>
@endif
@endforeach
HomeController.php
public function write()
{
return view('write');
}
write.blade.php没有内容。当我点击这个链接时,页面似乎被改变了,但页面并没有改变。只是url被更改了。如何重定向write.blade.php?如果您发布完整的主控制器,效果会更好
如果所有URL的主页内容相同。您可能没有正确启用nginx/apache重写。确保write.blade.php位于resources/view中。@vipul soratiya当然可以。比较“write.blade.php”的实际视图url和锚中生成的href。粘贴完整的HomeController,并在write.blade.php中编写一些内容以进行调试
public function write()
{
return view('write');
}