2018-01-13 22:06:19 +00: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 20:09:16 +00:00
|
|
|
return "<?php echo \Carbon\CarbonImmutable::createFromFormat(\Carbon\CarbonImmutable::DEFAULT_TO_STRING_FORMAT, $expression)->setTimezone(config('app.timezone'))->toDateTimeString(); ?>";
|
2018-01-13 22:06:19 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|