Added Collect::recursive()
This commit is contained in:
parent
6217dd53ea
commit
6df5f185a2
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Leenooks\Providers;
|
||||
|
||||
#use Acacha\User\Http\Middleware\GuestUser;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@ -24,6 +23,17 @@ class LeenooksServiceProvider extends ServiceProvider
|
||||
{
|
||||
$this->loadViewsFrom($this->_path.'/resources/themes/adminlte/views/', 'adminlte');
|
||||
$this->loadTranslationsFrom($this->_path.'/resources/themes/adminlte/lang/', 'adminlte_lang');
|
||||
|
||||
// Enable a recusive() collection function so that we can just arrives in config/*.php
|
||||
\Illuminate\Support\Collection::macro('recursive', function () {
|
||||
return $this->map(function ($value) {
|
||||
if (is_array($value) || is_object($value)) {
|
||||
return collect($value)->recursive();
|
||||
}
|
||||
|
||||
return $value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user