Skip to content

Commit

Permalink
Simplify app registration
Browse files Browse the repository at this point in the history
  • Loading branch information
tonning committed Jun 17, 2024
1 parent 415632e commit 44a2772
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"require": {
"php": "^8.3",
"astrogoat/strata": "^0.7.0",
"astrogoat/strata": "^0.7.7",
"spatie/laravel-package-tools": "^1.4.3",
"illuminate/contracts": "^10.0"
},
Expand Down
14 changes: 3 additions & 11 deletions src/SkeletonServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
namespace VendorName\Skeleton;

use Helix\Lego\Apps\App;
use Helix\Lego\LegoManager;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Helix\Lego\Apps\AppPackageServiceProvider;
use VendorName\Skeleton\Settings\SkeletonSettings;

class SkeletonServiceProvider extends PackageServiceProvider
class SkeletonServiceProvider extends AppPackageServiceProvider
{
public function registerApp(App $app)
public function registerApp(App $app): App
{
return $app
->name('skeleton')
Expand All @@ -23,13 +22,6 @@ public function registerApp(App $app)
->frontendRoutes(__DIR__.'/../routes/frontend.php');
}

public function registeringPackage()
{
$this->callAfterResolving('lego', function (LegoManager $lego) {
$lego->registerApp(fn (App $app) => $this->registerApp($app));
});
}

public function configurePackage(Package $package): void
{
$package->name('skeleton')->hasConfigFile()->hasViews();
Expand Down

0 comments on commit 44a2772

Please sign in to comment.