PHP code example of gulios / xsl-laravel-template-engine

1. Go to this page and download the library: Download gulios/xsl-laravel-template-engine 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/ */

    

gulios / xsl-laravel-template-engine example snippets


Route::get('/', ['as' => 'index', 'uses' => 'SomeController@index']);


class AlwaysProcessController extends Controller
{
    protected $xml;

    public function __construct()
    {
        $this->xml = \View::addChild('Controller');
        $this->xml->addAttribute('class', Route::currentRouteAction());
        $this->xml->addAttribute('function', Route::currentRouteName());
    }
}


namespace App\Http\Controllers;
use App\Http\Requests;

class SomeController extends AlwaysProcessController
{
    public function index()
    {
        //$this->xml->addChild('SomeTagName', 'SomeValue');
        
        //$this->xml->addData($ibanezImages, $someArrayData);
        
        return view('index');
    }
}