2018-01-13 23:06:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class BladeServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Perform post-registration booting of services.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
$this->app->make('blade.compiler')
|
|
|
|
->directive('datetimeHuman', function ($expression) {
|
2021-01-23 21:09:16 +01:00
|
|
|
return "<?php echo \Carbon\CarbonImmutable::createFromFormat(\Carbon\CarbonImmutable::DEFAULT_TO_STRING_FORMAT, $expression)->setTimezone(config('app.timezone'))->toDateTimeString(); ?>";
|
2018-01-13 23:06:19 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|