-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJinyHtmlServiceProvider.php
More file actions
52 lines (37 loc) · 1.19 KB
/
Copy pathJinyHtmlServiceProvider.php
File metadata and controls
52 lines (37 loc) · 1.19 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
<?php
namespace Jiny\Html;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Blade;
use Illuminate\View\Compilers\BladeCompiler;
use Livewire\Livewire;
class JinyHtmlServiceProvider extends ServiceProvider
{
private $package = "jinyhtml";
public function boot()
{
/*
// 모듈: 라우트 설정
$this->loadRoutesFrom(__DIR__.'/routes/web.php');
*/
$this->loadViewsFrom(__DIR__.'/../resources/views', $this->package);
$this->configureComponents();
}
public function register()
{
/* 라이브와이어 컴포넌트 등록 */
}
protected function configureComponents()
{
/* 컴포넌트 클래스 등록 */
/* 패키지::컴포넌트 => 페키지-컴포넌트 재지정*/
$this->callAfterResolving(BladeCompiler::class, function () {
//$this->registerComponent('modal');
//$this->registerComponent('modal-form');
//$this->registerComponent('modal-list');
});
}
protected function registerComponent(string $component)
{
Blade::component('jinyhtml::components.'.$component, 'jiny-'.$component);
}
}