akaunting/app/Providers/ViewComposer.php

51 lines
1.0 KiB
PHP
Raw Normal View History

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