class AssetPublisher (View source)

Properties

protected Filesystem $files

The filesystem instance.

protected string $publishPath

The path where assets should be published.

protected string $packagePath

The path where packages are located.

Methods

void
__construct(Filesystem $files, string $publishPath)

Create a new asset publisher instance.

bool
publish(string $name, string $source)

Copy all assets from a given path to the publish path.

bool
publishPackage(string $package, string $packagePath = null)

Publish a given package's assets to the publish path.

void
setPackagePath(string $packagePath)

Set the default package path.

Details

void __construct(Filesystem $files, string $publishPath)

Create a new asset publisher instance.

Parameters

Filesystem $files
string $publishPath

Return Value

void

bool publish(string $name, string $source)

Copy all assets from a given path to the publish path.

Parameters

string $name
string $source

Return Value

bool

Exceptions

RuntimeException

bool publishPackage(string $package, string $packagePath = null)

Publish a given package's assets to the publish path.

Parameters

string $package
string $packagePath

Return Value

bool

void setPackagePath(string $packagePath)

Set the default package path.

Parameters

string $packagePath

Return Value

void