首先感谢所有人的帮助。
我试图在收件箱页面上显示自定义内容。我的代码看起来像这样:
<?php
$page = basename($_SERVER['REQUEST_URI']);
if ($page == 'messages' || $page == "/" || $page == 'inbox') {
?>
@if ($buttons or $showSearchBox)
<div class="toolbar top">
{!! $buttons !!}
@if ($showSearchBox)
<div class="model-search-box">
@if (user()->countMessages() > 0)
<div class="inbox-notify">
You have unread messages, please read that!
</div>
@endif
{!! Form::open(['url' => URL::current().'/search']) !!}
{!! Form::text('search', $searchString, array('placeholder'=>'Search in messages ), ['class' => 'search-string']) !!}
{!! Form::submit(trans('app.search'), ['class' => 'button-search']) !!}
{!! Form::close() !!}
</div>
@endif
</div>
@endif
<?php } ?>
但此代码仅适用于&#34; messages / inbox&#34;页。我怎样才能将这些内容添加到&#34; messages / outbox&#34;页?抱歉英文不好。我是新手:)
答案 0 :(得分:0)
<?php
$page = basename($_SERVER['REQUEST_URI']);
if ($page == 'messages' || $page == "/" || $page == 'inbox' || $page == 'outbox') {
?>
@if ($buttons or $showSearchBox)
<div class="toolbar top">
{!! $buttons !!}
@if ($showSearchBox)
<div class="model-search-box">
@if (user()->countMessages() > 0)
<div class="inbox-notify">
You have unread messages, please read that!
</div>
@endif
{!! Form::open(['url' => URL::current().'/search']) !!}
{!! Form::text('search', $searchString, array('placeholder'=>'Search in messages ), ['class' => 'search-string']) !!}
{!! Form::submit(trans('app.search'), ['class' => 'button-search']) !!}
{!! Form::close() !!}
</div>
@endif
</div>
@endif
<?php } ?>