Skip to content

Commit adca16e

Browse files
author
Matt Berg
authored
Fix vendor:publish "Can't locate path: <0>" bug
Was getting a bug, 'Can't locate path: <0>', when running 'php artisan vendor:publish --provider="Codecasts\Auth\JWT\ServiceProvider"'. This is the fix to that error. Has not been tested on multiple versions of Laravel but looks simple enough. The publishes method should take a key => value array, not a simple text array as was previously in the code.
1 parent e18855a commit adca16e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class ServiceProvider extends LaravelServiceProvider
3434
public function boot()
3535
{
3636
// declare the configuration files available for publishing.
37-
$this->publishes([__DIR__.'../config/jwt.php'], 'config');
37+
$this->publishes([
38+
__DIR__.'../config/jwt.php' => config_path('jwt.php')
39+
]);
3840

3941
// case enabled, setups a guard match by middleware group name.
4042
$this->setupGuardMiddlewareMatch();
@@ -105,4 +107,4 @@ protected function setupGuardMiddlewareMatch()
105107
});
106108
}
107109
}
108-
}
110+
}

0 commit comments

Comments
 (0)