Skip to content

Instantly share code, notes, and snippets.

Last active May 11, 2016 05:16
What would you like to do?
use blade outside laravel, ref:
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{{ $pageTitle }}}</title>
<!-- Bootstrap -->
<link href="../assets/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="../assets/html5shiv.min.js"></script>
<script src="../assets/respond.min.js"></script>
This is the master sidebar.
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../assets/jquery/jquery-1.11.1.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../assets/bootstrap/js/bootstrap.js"></script>
<p>This is appended to the master sidebar.</p>
{{{ $content }}}
require 'vendor/autoload.php';
use Philo\Blade\Blade;
// blade
$views = __DIR__ . '/templates';
$cache = __DIR__ . '/../cache/tpladmin';
$blade = new Blade($views, $cache);
$contet = 'tes doang';
print $blade->view()->make('webdirectory', array('pageTitle' => 'Manage Directory', 'content' => $content));
Copy link

thanks buat contohnya.

mau tanya:

print $blade->view()->make('webdirectory', array('pageTitle' => 'Manage Directory', 'content' => $content));

kalau boleh tahu webdirectory itu didapatkan dari mana ya?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment