PHP code example of jeroen-g / laravel-pages
1. Go to this page and download the library: Download jeroen-g/laravel-pages 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/ */
jeroen-g / laravel-pages example snippets
Route::get('{uri?}', function($uri)
{
if(LPages::pageExists($uri))
{
$pageData = LPages::getPage($uri);
return View::make('page', $pageData);
}
else
{
App::abort(404, 'Page Not Found');
}
});