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;
|
2017-09-14 22:21:00 +03:00
|
|
|
use View;
|
|
|
|
|
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()
|
|
|
|
{
|
2018-05-25 16:57:58 +03:00
|
|
|
// Suggestions
|
|
|
|
View::composer(
|
2019-11-30 00:39:44 +03:00
|
|
|
'partials.admin.header', 'App\Http\ViewComposers\Suggestions'
|
2018-05-25 16:57:58 +03:00
|
|
|
);
|
|
|
|
|
2018-11-16 18:33:39 +03:00
|
|
|
// Notifications
|
|
|
|
View::composer(
|
2019-11-30 00:39:44 +03:00
|
|
|
'partials.admin.content', 'App\Http\ViewComposers\Notifications'
|
2018-11-16 18:33:39 +03:00
|
|
|
);
|
|
|
|
|
2017-09-14 22:21:00 +03:00
|
|
|
// Add company info to menu
|
|
|
|
View::composer(
|
2019-11-30 00:39:44 +03:00
|
|
|
['partials.admin.menu', 'partials.portal.menu'],
|
|
|
|
'App\Http\ViewComposers\Menu'
|
2017-09-14 22:21:00 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
// Add notifications to header
|
|
|
|
View::composer(
|
2019-11-30 00:39:44 +03:00
|
|
|
['partials.wizard.navbar', 'partials.admin.navbar', 'partials.portal.navbar'],
|
|
|
|
'App\Http\ViewComposers\Header'
|
2017-09-14 22:21:00 +03:00
|
|
|
);
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
// Add limits and bulk actions to index
|
2017-09-14 22:21:00 +03:00
|
|
|
View::composer(
|
|
|
|
'*.index', 'App\Http\ViewComposers\Index'
|
|
|
|
);
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
// Add limits to show
|
|
|
|
View::composer(
|
|
|
|
'*.show', 'App\Http\ViewComposers\Index'
|
|
|
|
);
|
|
|
|
|
2017-09-14 22:21:00 +03:00
|
|
|
// Add Modules
|
|
|
|
View::composer(
|
|
|
|
'modules.*', 'App\Http\ViewComposers\Modules'
|
|
|
|
);
|
2018-04-26 16:04:27 +03:00
|
|
|
|
2018-04-26 18:40:04 +03:00
|
|
|
// Add recurring
|
|
|
|
View::composer(
|
2019-11-30 00:39:44 +03:00
|
|
|
'partials.form.recurring', 'App\Http\ViewComposers\Recurring'
|
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
|
|
|
|
|
|
|
// Wizard
|
|
|
|
View::composer(
|
|
|
|
'layouts.wizard', 'App\Http\ViewComposers\Wizard'
|
|
|
|
);
|
2017-09-14 22:21:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the service provider.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|