Efficiently\Larasset\Commands\AssetsCommand::copyAssets PHP Method

copyAssets() protected method

Copy all asset files in the current Laravel application 'public/assets' folder
protected copyAssets ( ) : void
return void
    protected function copyAssets()
    {
        $packagePath = $this->packagePath();
        if ($this->useWindows()) {
            $source = $packagePath . "/public/assets";
        } else {
            $source = $packagePath . "/public/assets/";
        }
        $destination = $this->normalizePath(public_path('assets'));
        if (!File::exists($source)) {
            File::makeDirectory($source);
        }
        if (!File::exists($destination)) {
            File::makeDirectory($destination);
        }
        $copyAssetsCommand = $this->copyCommand() . ' ' . $this->copyOptions() . ' "' . $source . '" "' . $destination . '" > nul';
        shell_exec($copyAssetsCommand);
    }