PHP code example of felipepodesta / laravel-theme

1. Go to this page and download the library: Download felipepodesta/laravel-theme 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/ */

    

felipepodesta / laravel-theme example snippets



/*
    'providers' => [
        [...]
*/
        FelipePodesta\Theme\ServiceProvider::class,
/*
        [...]
    ],
*/



public function register()
{
    $this->app->view->addLocation(resource_path('themes/site'));
}

//



if ($this->app->request->is('login*', 'password*', 'register*', 'admin*')) {
    $this->app->view->addLocation(resource_path('themes/admin'));
} else {
    $this->app->view->addLocation(resource_path('themes/site'));
}

//