Windows 10 Laravel Permission denied in package development

303 Views Asked by At

I am trying to develop my first package in laravel everything was fine until I add my custom route and in my provider, I added this line of code loadRoutesFrom

public function boot()
{
   $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
   $this->loadRoutesFrom(__DIR__ . '/../routes/');
}

and my sample laravel project which uses this package I get the below error

require(E:\laragon\www\____\AuthManager\routes): Failed to open stream: Permission denied vendor\laravel\framework\src\Illuminate\Support\ServiceProvider .php line 152

I am using windows 10 and have admin I changed the permission on both projects the same and both projects are under the same directory.

enter image description here

1

There are 1 best solutions below

0
On

as @lagbox mentioned in his comment I should pass the file, not a directory to loadRoutesFrom method.