mirror of https://github.com/tobya/DocTo
33 lines
677 B
PHP
33 lines
677 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
\Illuminate\Support\Collection::macro('makeRecursive', function () {
|
|
return $this->map(function ($value) {
|
|
if (is_array($value) || is_object($value)) {
|
|
return collect($value)->makeRecursive();
|
|
}
|
|
|
|
return $value;
|
|
});
|
|
});
|
|
}
|
|
}
|