Views contain the HTML served by the frontend of your application. You can find and define views in the resources/views directory. A simple view might look something like this:

// resources/views/welcome.blade.php
        <h1>{{ config('') }}</h1>

Each file inside your resources/views directory is a view and is available for use however you like.


Layouts are the outer structural foundation of your application's HTML. It is considered best practice to leverage layouts via view inheritance to abstract your view presentation.

// resources/views/layouts/default.blade.php
        <title>App Name - @yield('title')</title>
            This is the default sidebar.

        <div class="container">

Extending Layouts

When defining a child view, use the Blade @extends directive to specify which layout the view should "inherit". Views that extend a Blade layout may inject content into the layout's sections using @section directives. Remember, as seen in the example above, these sections' contents will be displayed in the layout using @yield:

// resources/views/example.blade.php

@section('title', 'Example Title')


    <p>This is appended to the default sidebar.</p>

    <p>This is the content.</p>


Partials are reusable views intended to be included in many other views and even within other partials. You can use any view as a "partial" by using the include directive.

// Import /resources/views/partials/assets.blade.php


Includes are like named slots that can be accessed outside of, and prior to, the view layer.

use Streams\Core\Support\Facades\Includes;

Includes::include('assets', 'partials.scripts');
@foreach($includes->get('assets', []) as $include)
    @include $include


We recommend the following conventions as best practice.



Below is an excellent example of organizing utilitarian views like layouts and partials. These views are used for application structure and DRY'ing up views.

|-- partials/
|   |-- head.blade.php
|   |-- footer.blade.php
|   |-- navigation.blade.php
|-- layouts/
|   |-- amp.blade.php
|   |-- default.blade.php
|   |-- alternate.blade.php

Stream Views

Organizing stream views by stream can not only be automatically detected but bring order to large applications. You can even bundle stream specific partials and layouts within the stream directories to separate them from similar type views intended for global use, as shown above.

|-- posts/
|   |-- posts/contact
|   |   |-- cards.blade.php
|   |-- index.blade.php
|   |-- layout.blade.php
|   |-- view.blade.php
|-- contact/
|   |-- index.blade.php
|   |-- success.blade.php
|-- faq/
|   |-- index.blade.php
|   |-- show.blade.php