PHP code example of awjudd / layoutview

1. Go to this page and download the library: Download awjudd/layoutview library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

awjudd / layoutview example snippets


'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Awjudd\Layoutview\LayoutviewServiceProvider',

),

'aliases' => array(

    'App'             => 'Illuminate\Support\Facades\App',
    'Artisan'         => 'Illuminate\Support\Facades\Artisan',
    ...
    'View'            => 'Awjudd\Layoutview\Facades\LayoutViewFacade',
),

'layout' => array (

    /**
     * The layout that will be used to fall back on if the selected doesn't exist.
     * 
     * @var string
     */
    'fallback' => NULL,

    /**
     * The layout that will be the first choice to be used.
     * 
     * @var string
     */
    'selected' => NULL,
),

View::setSelectedLayout('base layout name');
View::setFallbackLayout('fallback layout name');

'namespaces' => array (
    /*
     * Should always keep a blank one here to search in no namespaces.
     */
    '',
),

View::make('home.index');

View::make('home.test');

$ php artisan config:publish awjudd/layoutview