Skip to content

Commit

Permalink
Fine-tuned the Publisher class
Browse files Browse the repository at this point in the history
  • Loading branch information
brand committed Apr 24, 2024
1 parent 7a1307b commit 772ed52
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class Publisher extends ServiceProvider
{
public function register(): void
{
if ($this->app->runningInConsole()) {
$this->publish();
}
}

public function boot(): void
Expand All @@ -21,17 +24,17 @@ protected function publish(): void
__DIR__.'/../database/migrations/2024_04_22_100734_add_roles_and_permissions_to_users_table.stub' => database_path('migrations/2024_04_22_100734_add_roles_and_permissions_to_users_table.php'),

// models
__DIR__.'/../stubs/app/Models/Admin.stub' => app_path('Models/Admin.php'),
__DIR__.'/../stubs/app/Models/User.stub' => app_path('Models/User.php'),
__DIR__.'/../app/Models/Admin.stub' => app_path('Models/Admin.php'),
__DIR__.'/../app/Models/User.stub' => app_path('Models/User.php'),

// resources
__DIR__.'/../stubs/app/Nova/Admin.stub' => app_path('Nova/Admin.php'),
__DIR__.'/../stubs/app/Nova/User.stub' => app_path('Nova/User.php'),
__DIR__.'/../app/Nova/Admin.stub' => app_path('Nova/Admin.php'),
__DIR__.'/../app/Nova/User.stub' => app_path('Nova/User.php'),

// policies
__DIR__.'/../stubs/app/Policies/AdminPolicy.stub' => app_path('Policies/AdminPolicy.php'),
__DIR__.'/../stubs/app/Policies/UserPolicy.stub' => app_path('Policies/UserPolicy.php'),
__DIR__.'/../stubs/app/Policies/CorePermissions.stub' => app_path('Policies/CorePermissions.php'),
__DIR__.'/../app/Policies/AdminPolicy.stub' => app_path('Policies/AdminPolicy.php'),
__DIR__.'/../app/Policies/UserPolicy.stub' => app_path('Policies/UserPolicy.php'),
__DIR__.'/../app/Policies/CorePermissions.stub' => app_path('Policies/CorePermissions.php'),
]);
}
}

0 comments on commit 772ed52

Please sign in to comment.