@if(Request::is('login') OR Request::is('tags') OR Request::is('categories') OR Request::is('posts') OR Request::is('tags/..') OR Request::is('categories/..') OR Request::is('posts/..') OR Request::is("posts/{$post->id}"))
@include('partials._navAdmin')
@else
@include('partials._nav')
Run Code Online (Sandbox Code Playgroud)
这是我的main.blade.php文件中的一个示例,现在我正在做的是我正在尝试使用2个不同的导航栏 - 我知道有更好的方法来做到这一点但我仍然无法掌握它!
我不认为重复Request ::是一遍又一遍的好编码标准.我是新手:(那边我想念的是什么?