PHP code example of plutonex / themes

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

    

plutonex / themes example snippets


	
	Route::get('/', function()
	{
		pxTheme::setTheme('myTheme');
		pxTheme::setLayout('default');

		return View::make('hello');
	});
	
	Route::group(array('prefix' => 'admin'),function()
	{
		pxTheme::setTheme('adminTheme');
		pxTheme::setLayout('default');

		Route::get('dashboard', function()
		{
			return View::make('admin.dashboard');
		}

		Route::get('users', function()
		{
			pxTheme::setLayout('list');

			return View::make('admin.dashboard');
		}

	});

 // app/routes.php 

 // Theme::when({pattern},{layout},{theme});

 Theme::when('/','homePage','myTheme');
 Theme::when('/*','default','myTheme');

 Theme::when('admin','default','adminTheme');
 Theme::when('admin/*','appLayout','adminTheme');