Created
January 21, 2016 15:34
-
-
Save dandelauro/0114717244d6a4f9fa8f to your computer and use it in GitHub Desktop.
A sample "Home" controller using Twig and Mustache PHP templating.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
class HomeController extends Controller | |
{ | |
public function show() | |
{ | |
$dataJsonAsPhpArray = array( | |
“title” => “This is my title.”, | |
“subTitle” => “There are many like it, but this one is mine.”, | |
“description” => “My title is my best friend. It is my life. I must master it as I must master my life.” | |
) | |
return view('home', array( | |
"title" => "Pattern Lab", | |
"htmlClass" => "pl", | |
"bodyClass" => "body", | |
"allOfThePatterns" => view('PatternLab::04-pages.01-home', $dataJsonAsPhpArray) | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment