Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

akaunting/akaunting

9348 stars
3 code files
View akaunting/akaunting on GitHub

app/Providers/Blade.php

Open in GitHub
use App\Traits\DateTime;
use Illuminate\Support\Facades\Blade as Facade;
use Illuminate\Support\ServiceProvider;
 
class Blade extends ServiceProvider
{
use DateTime;
 
public function boot()
{
Facade::directive('date', function ($expression) {
return "<?php echo company_date($expression); ?>";
});
 
Facade::directive('widget', function ($expression) {
return "<?php echo show_widget($expression); ?>";
});
}
//
}

resources/views/common/dashboards/show.blade.php

Open in GitHub
//
@section('content')
<div class="row">
@foreach($widgets as $widget)
@widget($widget)
@endforeach
</div>
@endsection
//

config/app.php

Open in GitHub
return [
'providers' => [
//
Illuminate\View\ViewServiceProvider::class,
//
],
//
];

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.