/** * Write the service provider stub for the package. * * @param \Illuminate\Workbench\Package $package * @param string $directory * @param string $stub * @return void */ protected function writeProviderStub(Package $package, $directory, $stub) { $path = $this->createClassDirectory($package, $directory); // The primary source directory where the package's classes will live may not // exist yet, so we will need to create it before we write these providers // out to that location. We'll go ahead and create now here before then. $file = $path . '/' . $package->name . 'ServiceProvider.php'; $this->files->put($file, $stub); }