This repository was archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathBulkUploadServiceProvider.php
More file actions
70 lines (53 loc) · 1.78 KB
/
BulkUploadServiceProvider.php
File metadata and controls
70 lines (53 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
namespace Webkul\Bulkupload\Providers;
use Illuminate\Support\ServiceProvider;
class BulkUploadServiceProvider extends ServiceProvider
{
public function boot()
{
include __DIR__ . '/../Http/admin-routes.php';
$this->app->register(ModuleServiceProvider::class);
$this->app->register(EventServiceProvider::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'bulkupload');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'bulkupload');
$this->publishes([
__DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'),
], 'public');
$this->publishes([
__DIR__ . '/../Resources/views/admin/bulk-upload/layouts/nav-aside.blade.php' => resource_path('views/vendor/admin/layouts/nav-aside.blade.php'),
]);
view()->composer(['bulkupload::admin.bulk-upload.upload-files.index'], function ($view) {
$items = [];
foreach (config('product_types') as $item) {
$item['children'] = [];
array_push($items, $item);
}
$types = core()->sortItems($items);
$view->with('productTypes', $types);
});
}
/**
* Register services.
*
* @return void
*/
public function register()
{
$this->registerConfig();
}
/**
* Register package config.
*
* @return void
*/
protected function registerConfig()
{
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/system.php', 'core'
);
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin'
);
}
}