mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 10:14:16 +08:00
Replace a few forgotten obsolete helpers
- Apparently, I forgot that `array_flatten` comes from Laravel. :) - When I did this previously, I did not search the views directory.
This commit is contained in:
parent
3b39c212e0
commit
e4077ab4ad
|
@ -267,7 +267,7 @@ class Extension implements Arrayable
|
|||
$extenders = [$extenders];
|
||||
}
|
||||
|
||||
return array_flatten($extenders);
|
||||
return Arr::flatten($extenders);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace Flarum\Foundation;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use RuntimeException;
|
||||
|
||||
class Site
|
||||
|
@ -62,6 +63,6 @@ class Site
|
|||
return [];
|
||||
}
|
||||
|
||||
return array_flatten($extenders);
|
||||
return Arr::flatten($extenders);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ use Flarum\Foundation\Application;
|
|||
use Flarum\Frontend\Compiler\CompilerInterface;
|
||||
use Flarum\Frontend\Document;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
use Illuminate\Support\Arr;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class Assets
|
||||
|
@ -48,7 +49,7 @@ class Assets
|
|||
];
|
||||
|
||||
if ($this->app->inDebugMode()) {
|
||||
$this->commit(array_flatten($compilers));
|
||||
$this->commit(Arr::flatten($compilers));
|
||||
}
|
||||
|
||||
$document->js = array_merge($document->js, $this->getUrls($compilers['js']));
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<div id="header-navigation" class="Header-navigation"></div>
|
||||
<div class="container">
|
||||
<h1 class="Header-title">
|
||||
<a href="{{ array_get($forum, 'baseUrl') }}">
|
||||
<?php $title = array_get($forum, 'title'); ?>
|
||||
@if ($logo = array_get($forum, 'logoUrl'))
|
||||
<a href="{{ \Illuminate\Support\Arr::get($forum, 'baseUrl') }}">
|
||||
<?php $title = \Illuminate\Support\Arr::get($forum, 'title'); ?>
|
||||
@if ($logo = \Illuminate\Support\Arr::get($forum, 'logoUrl'))
|
||||
<img src="{{ $logo }}" alt="{{ $title }}" class="Header-logo">
|
||||
@else
|
||||
{{ $title }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{!! array_get($forum, 'headerHtml') !!}
|
||||
{!! \Illuminate\Support\Arr::get($forum, 'headerHtml') !!}
|
||||
|
||||
<div id="app" class="App">
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
|||
<div id="header-navigation" class="Header-navigation"></div>
|
||||
<div class="container">
|
||||
<h1 class="Header-title">
|
||||
<a href="{{ array_get($forum, 'baseUrl') }}" id="home-link">
|
||||
@if ($logo = array_get($forum, 'logoUrl'))
|
||||
<img src="{{ $logo }}" alt="{{ array_get($forum, 'title') }}" class="Header-logo">
|
||||
<a href="{{ \Illuminate\Support\Arr::get($forum, 'baseUrl') }}" id="home-link">
|
||||
@if ($logo = \Illuminate\Support\Arr::get($forum, 'logoUrl'))
|
||||
<img src="{{ $logo }}" alt="{{ \Illuminate\Support\Arr::get($forum, 'title') }}" class="Header-logo">
|
||||
@else
|
||||
{{ array_get($forum, 'title') }}
|
||||
{{ \Illuminate\Support\Arr::get($forum, 'title') }}
|
||||
@endif
|
||||
</a>
|
||||
</h1>
|
||||
|
@ -39,4 +39,4 @@
|
|||
|
||||
</div>
|
||||
|
||||
{!! array_get($forum, 'footerHtml') !!}
|
||||
{!! \Illuminate\Support\Arr::get($forum, 'footerHtml') !!}
|
||||
|
|
Loading…
Reference in New Issue
Block a user