akaunting/app/Providers/ViewComposer.php

51 lines
1.0 KiB
PHP
Raw Normal View History

2017-09-14 19:21:00 +00:00
<?php
namespace App\Providers;
2019-11-16 07:21:14 +00:00
use Illuminate\Support\ServiceProvider as Provider;
2022-06-01 07:15:55 +00:00
use Illuminate\Support\Facades\View;
2017-09-14 19:21:00 +00:00
2019-11-16 07:21:14 +00:00
class ViewComposer extends Provider
2017-09-14 19:21:00 +00:00
{
/**
* Register bindings in the container.
*
* @return void
*/
public function boot()
{
2022-06-01 07:15:55 +00:00
// Add Contact Type
2018-05-25 13:57:58 +00:00
View::composer(
2022-06-01 07:15:55 +00:00
['contacts.*'],
'App\Http\ViewComposers\ContactType'
2018-04-26 15:40:04 +00:00
);
2020-12-23 22:28:38 +00:00
// Add Document Type
View::composer(
['documents.*', 'portal.documents.*'],
'App\Http\ViewComposers\DocumentType'
);
2021-06-01 20:58:08 +00:00
2022-06-01 07:15:55 +00:00
// Document Recurring Metadata
2021-06-01 20:58:08 +00:00
View::composer(
2022-06-01 07:15:55 +00:00
['components.documents.form.metadata'],
'App\Http\ViewComposers\DocumentRecurring'
2021-06-01 20:58:08 +00:00
);
2022-04-25 12:04:04 +00:00
View::composer(
2022-06-01 07:15:55 +00:00
['components.layouts.admin.notifications'],
2022-04-25 12:04:04 +00:00
'App\Http\ViewComposers\ReadOnlyNotification'
);
2017-09-14 19:21:00 +00:00
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
}