*/ 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:----uO4jvtqgHu7Jxnb18UjBrtVUbuKEizCI2FRfI/Upqs9AjsW8GvR7C8hpNXhFHCTKrL+FWtgTjEC0hOfzCBv7BJ/9L1O2vBno3IdDGvra0hGpAbJDr0+9tIjXDbPVYxzJsswBE7SDpCiA8ZgL+EKH8uIqqHaGtNl2FPV5k371jXPrBm7gEIO6c4N6oNYYhKcyWuOmiuuRI3DCpyt21dZg3nSHVav2eSpLGCqts43Y5vcMcxG/8mGcMqMY7Hn3i3G1n/x+AFBXEX6DRtnUaOcihhDJ3ds7Fju6HA6WCE6FeXsi8m3uiIUngv91ea8Th/P9/zS3lIP0nR3xl7LlRR+CYsnf1JVMdlfxh2E6gzyvuSLiOUH81C9Z30flz643daDqs5l9t3rB+gssf2ERBlICZbF9bp+n3IkNZc+DqoVT2ZA4vmaQhq1RwsgLUo+N7bzLoik7ps3SwpSdSP6yVjl3mKjCnYjuTT1cYGvVOrvFLB3J1UfNewjLGIDv4fZta7CQ/fYv4Svi938FDNSW2uKkbKofQYmUf28hPL3FhiSR/C73zs7PhBt18smlyic/LDPgpkgEw3fj3Yu85SW30GnddkkCnXaKOUyKcgKd89HEvRZWtCJsy/ZsZad4Fvj5fHjyIitIvoSoRulaedEyKURAdbl5E4CoAZzV5BSJ+Vs42Hs=----ATTACHMENT:----NjM4NTMxMzcxNjc2ODQ4OSAxMDQxMjU3MDc5NjgyMjE0IDIzMDEyMDU4MjEwMjcxNjc=