-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFilterServiceProvider.php
36 lines (31 loc) · 1.26 KB
/
FilterServiceProvider.php
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
<?php
namespace Labrodev\Filters;
use Labrodev\Filters\Components\BooleanField;
use Labrodev\Filters\Components\CustomSelectField;
use Labrodev\Filters\Components\DateRangeField;
use Labrodev\Filters\Components\Field;
use Labrodev\Filters\Components\MultipleSelectField;
use Labrodev\Filters\Components\SelectField;
use Labrodev\Filters\Components\Link;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
class FilterServiceProvider extends PackageServiceProvider
{
public const PACKAGE_NAME = 'filter-components';
public function configurePackage(Package $package): void
{
$packageName = self::PACKAGE_NAME;
$package
->name($packageName)
->hasTranslations()
->hasViews()
->hasViewComponents('filter', BooleanField::class)
->hasViewComponents('filter', CustomSelectField::class)
->hasViewComponents('filter', DateRangeField::class)
->hasViewComponents('filter', Field::class)
->hasViewComponents('filter', MultipleSelectField::class)
->hasViewComponents('filter', SelectField::class)
->hasViewComponents('sort', Link::class);
}
}