Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Workaround to support Lumen #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Bican/Roles/RolesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ class RolesServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../../config/roles.php' => config_path('roles.php')
], 'config');
$configPath = __DIR__ . '/../../config/roles.php';
if (function_exists('config_path')) {
$publishPath = config_path('roles.php');
} else {
$publishPath = base_path('config/roles.php');
}
$this->publishes([$configPath => $publishPath], 'config');

$this->publishes([
__DIR__ . '/../../migrations/' => base_path('/database/migrations')
Expand Down