Wednesday, March 15, 2017

Permission denied creating package in laravel 5.4

I'm creating a cms package that I will be using. The problem that I'm having is that after I published my package I can't get it to work. I'm getting this error

ErrorException in CmsServiceProvider.php line 35: include(C:\wamp\www\laravel_package\packages\testing\cms\src\Modules): failed to open stream: Permission denied

This is my CmsServiceProvider

<?php

namespace Testing\Cms;

use Illuminate\Support\ServiceProvider;

class CmsServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {

        $this->publishes([
            __DIR__.'/Modules' => base_path('app/Modules'),
        ]);

    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {

        include __DIR__.'/Modules';
    }
}

Line 35 is

include __DIR__.'/Modules';

If there is anything else that I need to give in order to help me with my problem please let me know. I wasn't sure on all the info I needed to give.



via Isis

Advertisement