Create new layout

Create a layout file in /public/themes/<current theme>/layouts following default.blade.php in this folder. Then customize it like you want.

Example: custom-layout.blade.php

{!! Theme::partial('header') !!}
{!! Theme::content() !!}
{!! Theme::partial('footer') !!}

Using layout for pages

Step 1: Register new template to /public/themes/<current theme>/functions/functions.php

    'custom-layout' => __('Custom layout'), // custom-layout is the name of layout file.

Step 2: Go to Admin panel -> Pages and select template Custom layout for a page to test.

Using layout for plugin front views.


public function getExample()
    return \Theme::layout('custom-layout')->scope('example', ['data' => 123])->render();