class Factory implements Factory (View source)
void | __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) Create a new view factory instance. | |
View | file(string $path, array $data = array(), array $mergeData = array()) Get the evaluated view contents for the given view. | |
View | make(string $view, array $data = array(), array $mergeData = array()) Get the evaluated view contents for the given view. | |
View | of(string $view, mixed $data = array()) Get the evaluated view contents for a named view. | |
void | name(string $view, string $name) Register a named view. | |
void | alias(string $view, string $alias) Add an alias for a view. | |
bool | exists(string $view) Determine if a given view exists. | |
string | renderEach(string $view, array $data, string $iterator, string $empty = 'raw|') Get the rendered contents of a partial from a loop. | |
EngineInterface | getEngineFromPath(string $path) Get the appropriate view engine for the given path. | |
mixed | share(array|string $key, mixed $value = null) Add a piece of shared data to the environment. | |
array | creator(array|string $views, Closure|string $callback) Register a view creator event. | |
array | composers(array $composers) Register multiple view composers via an array. | |
array | composer(array|string $views, Closure|string $callback, int|null $priority = null) Register a view composer event. | |
void | callComposer(View $view) Call the composer for a given view. | |
void | callCreator(View $view) Call the creator for a given view. | |
void | startSection(string $section, string $content = '') Start injecting content into a section. | |
void | inject(string $section, string $content) Inject inline content into a section. | |
string | yieldSection() Stop injecting content into a section and return its contents. | |
string | stopSection(bool $overwrite = false) Stop injecting content into a section. | |
string | appendSection() Stop injecting content into a section and append it. | |
string | yieldContent(string $section, string $default = '') Get the string contents of a section. | |
void | startPush(string $section, string $content = '') Start injecting content into a push section. | |
string | stopPush() Stop injecting content into a push section. | |
string | yieldPushContent(string $section, string $default = '') Get the string contents of a push section. | |
void | flushSections() Flush all of the section contents. | |
void | flushSectionsIfDoneRendering() Flush all of the section contents if done rendering. | |
void | incrementRender() Increment the rendering counter. | |
void | decrementRender() Decrement the rendering counter. | |
bool | doneRendering() Check if there are no active render operations. | |
void | addLoop(Countable|array $data) Add new loop to the stack. | |
void | incrementLoopIndices() Increment the top loop's indices. | |
void | popLoop() Pop a loop from the top of the loop stack. | |
array | getFirstLoop() Get an instance of the first loop in the stack. | |
array | getLoopStack() Get the entire loop stack. | |
void | addLocation(string $location) Add a location to the array of view locations. | |
void | addNamespace(string $namespace, string|array $hints) Add a new namespace to the loader. | |
void | prependNamespace(string $namespace, string|array $hints) Prepend a new namespace to the loader. | |
void | addExtension(string $extension, string $engine, Closure $resolver = null) Register a valid view extension and its engine. | |
array | getExtensions() Get the extension to engine bindings. | |
EngineResolver | getEngineResolver() Get the engine resolver instance. | |
ViewFinderInterface | getFinder() Get the view finder instance. | |
void | setFinder(ViewFinderInterface $finder) Set the view finder instance. | |
Dispatcher | getDispatcher() Get the event dispatcher instance. | |
void | setDispatcher(Dispatcher $events) Set the event dispatcher instance. | |
Container | getContainer() Get the IoC container instance. | |
void | setContainer(Container $container) Set the IoC container instance. | |
mixed | shared(string $key, mixed $default = null) Get an item from the shared data. | |
array | getShared() Get all of the shared data for the environment. | |
bool | hasSection(string $name) Check if section exists. | |
array | getSections() Get the entire array of sections. | |
array | getNames() Get all of the registered named views in environment. |
Create a new view factory instance.
Get the evaluated view contents for the given view.
Get the evaluated view contents for the given view.
Get the evaluated view contents for a named view.
Register a named view.
Add an alias for a view.
Determine if a given view exists.
Get the rendered contents of a partial from a loop.
Get the appropriate view engine for the given path.
Add a piece of shared data to the environment.
Register a view creator event.
Register multiple view composers via an array.
Register a view composer event.
Call the composer for a given view.
Call the creator for a given view.
Start injecting content into a section.
Inject inline content into a section.
Stop injecting content into a section and return its contents.
Stop injecting content into a section.
Stop injecting content into a section and append it.
Get the string contents of a section.
Start injecting content into a push section.
Stop injecting content into a push section.
Get the string contents of a push section.
Flush all of the section contents.
Flush all of the section contents if done rendering.
Increment the rendering counter.
Decrement the rendering counter.
Check if there are no active render operations.
Add new loop to the stack.
Increment the top loop's indices.
Pop a loop from the top of the loop stack.
Get an instance of the first loop in the stack.
Get the entire loop stack.
Add a location to the array of view locations.
Add a new namespace to the loader.
Prepend a new namespace to the loader.
Register a valid view extension and its engine.
Get the extension to engine bindings.
Get the engine resolver instance.
Get the view finder instance.
Set the view finder instance.
Get the event dispatcher instance.
Set the event dispatcher instance.
Get the IoC container instance.
Set the IoC container instance.
Get an item from the shared data.
Get all of the shared data for the environment.
Check if section exists.
Get the entire array of sections.
Get all of the registered named views in environment.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/View/Factory.html