forked from Davisonpro/php-react-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
32 lines (28 loc) · 858 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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 STATIC_URL = 'http://localhost/my-app';
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>