Skip to content

Commit e833b51

Browse files
committed
changes regrading installation
1 parent 0b44bbc commit e833b51

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

src/Permissions/PermissionServiceProvider.php

-26
This file was deleted.

src/PermissionsServiceProvider.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Lazycode\Permissions;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class PermissionsServiceProvider extends ServiceProvider
8+
{
9+
public function boot()
10+
{
11+
// Publish the configuration and migration files
12+
$this->publishes([
13+
__DIR__ . '\config\permissions.php' => config_path('permissions.php'), // Note the correct file name
14+
__DIR__ . '\database\migrations\create_permission_tables.php' => database_path('migrations/' . date('Y_m_d_His', time()) . '_create_permission_tables.php'),
15+
], 'config');
16+
17+
// Load migrations
18+
$this->loadMigrationsFrom(__DIR__.'\database\migrations');
19+
}
20+
21+
public function register()
22+
{
23+
// Merge configuration
24+
$this->mergeConfigFrom(__DIR__ . '\config\permissions.php', 'permissions'); // Ensure this matches the config file
25+
}
26+
}

0 commit comments

Comments
 (0)