mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
21 lines
628 B
PHP
21 lines
628 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\View\Compilers\BladeCompiler;
|
|
|
|
class BladeServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Perform post-registration booting of services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->make(BladeCompiler::class)
|
|
->directive('datetimeHuman', fn (string $expression): string => "<?php echo \Carbon\CarbonImmutable::createFromFormat(\Carbon\CarbonImmutable::DEFAULT_TO_STRING_FORMAT, $expression)->setTimezone(config('app.timezone'))->toDateTimeString(); ?>");
|
|
}
|
|
}
|