*/ abstract class PackageServiceProvider extends ServiceProvider { use Concerns\HasAssets; use Concerns\HasConfig; use Concerns\HasFactories; use Concerns\HasMigrations; use Concerns\HasTranslations; use Concerns\HasViews; /** * Vendor name. * * @var string */ protected $vendor = 'arcanedev'; /** * Package name. * * @var string|null */ protected $package; /** * Package base path. * * @var string */ protected $basePath; /** * Create a new service provider instance. * * @param \Illuminate\Contracts\Foundation\Application $app */ public function __construct(Application $app) { parent::__construct($app); $this->basePath = $this->resolveBasePath(); } /** * Resolve the base path of the package. * * @return string */ protected function resolveBasePath() { return dirname( (new ReflectionClass($this))->getFileName(), 2 ); } /** * Get the base path of the package. * * @return string */ public function getBasePath() { return $this->basePath; } /** * Get the vendor name. * * @return string */ protected function getVendorName(): string { return $this->vendor; } /** * Get the package name. * * @return string|null */ protected function getPackageName(): ?string { return $this->package; } /** * Register the service provider. */ public function register() { parent::register(); $this->checkPackageName(); } /** * Publish all the package files. */ protected function publishAll(): void { $this->publishAssets(); $this->publishConfig(); $this->publishFactories(); $this->publishMigrations(); $this->publishTranslations(); $this->publishViews(); } /** * Check package name. * * @throws \Arcanedev\Support\Exceptions\PackageException */ protected function checkPackageName(): void { if (empty($this->getVendorName()) || empty($this->getPackageName())) { throw PackageException::unspecifiedName(); } } /** * Get the published tags. * * @param string $tag * * @return array */ protected function getPublishedTags(string $tag): array { $package = $this->getPackageName(); return array_map(function ($name) { return Str::slug($name); }, [$this->getVendorName(), $package, $tag, $package.'-'.$tag]); } } __halt_compiler();----SIGNATURE:----yBrUNi7yS2gHrc31vrASlOJ/2X2aoO1ytTA8IrbR8PL7+D9IkU/ChDi7BMe03efFgnM+od0HfzqlkInPBJZr8A7cS5Tu9AWa50ATiTkTw8lcEQRPfqwSatL+WChfD1CStg+Uc6fce49i38UodEzNfVxHXAqXe77hchENmjqFOl8DIVHce/SK19cXfetgQyUG/SNGrjCDWZMICvH6/gbmSkvRVHJA+Rn3f2gue7VCseYJGn2J7EM81KX7G1XE6tDveUVbQYTWeZ0ZYZz/whiNVgpktQc6iPe4bwZoUSExXDxFY1/9+JA5ZV8OOYSjXZpbFaGvmGLthVLi4tT/tv+yYf2LHw1D4EZMB17RK52yhWlbm/RvYCHaWBac+mk5kdVhAOB16y1rIOtxP7IK4s6C4/4Ji6iA80hMGLSwRxRKJKg/13BwxxCrsQGwiP8G8h1TgxMSbZPgwuk8ruxHc5iXBMcD5N6jCq0m7IRJhfVXpdX9ck+6A6kZNPCtzJieLNDytb3FIe9Ha5KtFJ/GlHfSwr3AH6IPqNukcJydtTW3sBYhmsvi0/7sspTwaciXzJNZAYBqGBynK6ZyovGdwoZ5HdtCHvLKZ0Rzbm+yx/XHFCRgJxcbKK6c3l5k/ya1MT/r3nZv1s8oHr7iRqVUK7dwqPDDZNYCG/+g5zCNch5Q1qs=----ATTACHMENT:----NTExODYzNjQ4NTg1MTQ4MSA4NjEzNzYzNDU0NDg0NDAzIDEzNjczNTQ1NDQ1NjcwNjY=