v2 first commit
This commit is contained in:
34
app/Providers/Blade.php
Normal file
34
app/Providers/Blade.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?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); ?>";
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user