Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 虽然页面已刷新且url已更改,但页面具有相同的视图。拉威尔5.2_Php_Laravel_Laravel 5.2 - Fatal编程技术网

Php 虽然页面已刷新且url已更改,但页面具有相同的视图。拉威尔5.2

Php 虽然页面已刷新且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.

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.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');
}