class ViewServiceProvider extends ServiceProvider

Properties

protected Application $app

The application instance.

from  ServiceProvider
protected bool $defer

Indicates if loading of the provider is deferred.

from  ServiceProvider
static protected array $publishes

The paths that should be published.

from  ServiceProvider
static protected array $publishGroups

The paths that should be published by group.

from  ServiceProvider

Methods

void
__construct(Application $app)

Create a new service provider instance.

void
mergeConfigFrom(string $path, string $key)

Merge the given configuration with the existing configuration.

void
loadRoutesFrom(string $path)

Load the given routes file if routes are not already cached.

void
loadViewsFrom(string $path, string $namespace)

Register a view file namespace.

void
loadTranslationsFrom(string $path, string $namespace)

Register a translation file namespace.

void
loadMigrationsFrom(array|string $paths)

Register a database migration path.

void
publishes(array $paths, string $group = null)

Register paths to be published by the publish command.

void
ensurePublishArrayInitialized(string $class)

Ensure the publish array for the service provider is initialized.

void
addPublishGroup(string $group, array $paths)

Add a publish group / tag to the service provider.

static array
pathsToPublish(string $provider = null, string $group = null)

Get the paths to publish.

static array
pathsForProviderOrGroup(string|null $provider, string|null $group)

Get the paths for the provider or group (or both).

static array
pathsForProviderAndGroup(string $provider, string $group)

Get the paths for the provider and group.

void
commands(array|mixed $commands)

Register the package's custom Artisan commands.

array
provides()

Get the services provided by the provider.

array
when()

Get the events that trigger this service provider to register.

bool
isDeferred()

Determine if the provider is deferred.

static array
compiles() deprecated

Get a list of files that should be compiled for the package.

void
register()

Register the service provider.

void
registerFactory()

Register the view environment.

void
registerViewFinder()

Register the view finder implementation.

void
registerEngineResolver()

Register the engine resolver instance.

void
registerFileEngine(EngineResolver $resolver)

Register the file engine implementation.

void
registerPhpEngine(EngineResolver $resolver)

Register the PHP engine implementation.

void
registerBladeEngine(EngineResolver $resolver)

Register the Blade engine implementation.

Details

in ServiceProvider at line 43
void __construct(Application $app)

Create a new service provider instance.

Parameters

Application $app

Return Value

void

in ServiceProvider at line 55
protected void mergeConfigFrom(string $path, string $key)

Merge the given configuration with the existing configuration.

Parameters

string $path
string $key

Return Value

void

in ServiceProvider at line 68
protected void loadRoutesFrom(string $path)

Load the given routes file if routes are not already cached.

Parameters

string $path

Return Value

void

in ServiceProvider at line 82
protected void loadViewsFrom(string $path, string $namespace)

Register a view file namespace.

Parameters

string $path
string $namespace

Return Value

void

in ServiceProvider at line 98
protected void loadTranslationsFrom(string $path, string $namespace)

Register a translation file namespace.

Parameters

string $path
string $namespace

Return Value

void

in ServiceProvider at line 109
protected void loadMigrationsFrom(array|string $paths)

Register a database migration path.

Parameters

array|string $paths

Return Value

void

in ServiceProvider at line 125
protected void publishes(array $paths, string $group = null)

Register paths to be published by the publish command.

Parameters

array $paths
string $group

Return Value

void

in ServiceProvider at line 142
protected void ensurePublishArrayInitialized(string $class)

Ensure the publish array for the service provider is initialized.

Parameters

string $class

Return Value

void

in ServiceProvider at line 156
protected void addPublishGroup(string $group, array $paths)

Add a publish group / tag to the service provider.

Parameters

string $group
array $paths

Return Value

void

in ServiceProvider at line 174
static array pathsToPublish(string $provider = null, string $group = null)

Get the paths to publish.

Parameters

string $provider
string $group

Return Value

array

in ServiceProvider at line 192
static protected array pathsForProviderOrGroup(string|null $provider, string|null $group)

Get the paths for the provider or group (or both).

Parameters

string|null $provider
string|null $group

Return Value

array

in ServiceProvider at line 212
static protected array pathsForProviderAndGroup(string $provider, string $group)

Get the paths for the provider and group.

Parameters

string $provider
string $group

Return Value

array

in ServiceProvider at line 227
void commands(array|mixed $commands)

Register the package's custom Artisan commands.

Parameters

array|mixed $commands

Return Value

void

in ServiceProvider at line 241
array provides()

Get the services provided by the provider.

Return Value

array

in ServiceProvider at line 251
array when()

Get the events that trigger this service provider to register.

Return Value

array

in ServiceProvider at line 261
bool isDeferred()

Determine if the provider is deferred.

Return Value

bool

in ServiceProvider at line 273
static array compiles() deprecated

deprecated

Get a list of files that should be compiled for the package.

Return Value

array

at line 19
void register()

Register the service provider.

Return Value

void

at line 33
void registerFactory()

Register the view environment.

Return Value

void

at line 61
void registerViewFinder()

Register the view finder implementation.

Return Value

void

at line 73
void registerEngineResolver()

Register the engine resolver instance.

Return Value

void

at line 95
void registerFileEngine(EngineResolver $resolver)

Register the file engine implementation.

Parameters

EngineResolver $resolver

Return Value

void

at line 108
void registerPhpEngine(EngineResolver $resolver)

Register the PHP engine implementation.

Parameters

EngineResolver $resolver

Return Value

void

at line 121
void registerBladeEngine(EngineResolver $resolver)

Register the Blade engine implementation.

Parameters

EngineResolver $resolver

Return Value

void