Milad
Milad

Reputation: 859

Windows 10 Laravel Permission denied in package development

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

Upvotes: 0

Views: 308

Answers (1)

Milad
Milad

Reputation: 859

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

Upvotes: 0

Related Questions