app > languages > en > home.php1 2 3 4 5 6 7 8 9 10 11 12 13 14‹?php return [ 'title' => 'Wolff', 'meta' => 'Wolff - Framework', 'description' => 'Small PHP framework' ];
Create a language file (Optional)
app > controllers > home.php1 2 3 4 5 6 7 8 9 10 11 12 13 14‹?php namespace Controller; use Core\{Controller, Language, View}; class Home extends Controller { public function index() { $data['text'] = Language::get('home'); View::render('home', $data); } }
Create a controller
app > views > home.wlf1 2 3 4 5 6 7 8 9 10 11 12 13 14<!DOCTYPE html> <head> <title>{{ $text['meta'] }}</title> </head> <body> <h2>{{ $text['title'] }}</h2> <p>{{ $text['description'] }}</p> </body> </html>
Design the view
Requests and questions can be send to the email [email protected], you will be contacted shortly.