2019-11-16 10:21:14 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use App\Traits\DateTime;
|
|
|
|
use Illuminate\Support\Facades\Blade as Facade;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class Blade extends ServiceProvider
|
|
|
|
{
|
|
|
|
use DateTime;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
Facade::directive('date', function ($expression) {
|
|
|
|
return "<?php echo company_date($expression); ?>";
|
|
|
|
});
|
2019-12-31 02:20:10 +03:00
|
|
|
|
|
|
|
Facade::directive('widget', function ($expression) {
|
|
|
|
return "<?php echo show_widget($expression); ?>";
|
|
|
|
});
|
2022-04-25 15:04:04 +03:00
|
|
|
|
|
|
|
Facade::if('readonly', function () {
|
|
|
|
return config('read-only.enabled');
|
|
|
|
});
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|