mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 09:02:28 +01:00
20 lines
581 B
PHP
20 lines
581 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class BladeServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Perform post-registration booting of services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->make('blade.compiler')
|
|
->directive('datetimeHuman', function ($expression) {
|
|
return "<?php echo \Carbon\CarbonImmutable::createFromFormat(\Carbon\CarbonImmutable::DEFAULT_TO_STRING_FORMAT, $expression)->setTimezone(config('app.timezone'))->toDateTimeString(); ?>";
|
|
});
|
|
}
|
|
}
|