Moved php logic from lorem to routes.php