Skip to content

Instantly share code, notes, and snippets.

@Davisonpro
Last active October 22, 2019 11:38
Show Gist options
  • Save Davisonpro/b9f02d343ca0bab34913766636af2823 to your computer and use it in GitHub Desktop.
Save Davisonpro/b9f02d343ca0bab34913766636af2823 to your computer and use it in GitHub Desktop.
The main entry of our website
<?php
$user = (object) [
'name' => 'Jane Doe',
'email' => 'janedoe@gmail.com',
'logged' => true
];
?>
<!doctype html>
<html lang="en">
<head>
<title>React PHP starter Kit</title>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/app/assets/css/app.css" type="text/css">
</head>
<script type="text/javascript">
var myApp = {
user : <?php echo json_encode($user); ?>,
logged : <?php echo $user->logged; ?>
};
</script>
<body>
<div id="app"></div>
<script type="text/javascript" src="/app/assets/bundle/main.bundle.js" ></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment