1public function index() {
2
3 $user = Auth::user();
4 $page = array(
5 'title' => 'Hello World',
6 'template' => 'welcome',
7 );
8
9 $page = (object)$page;
10
11 return View('index', array(
12 'user' => $user,
13 'page' => $page,
14 ));
15
16}
17
1function objectToArray(&$object)
2{
3 return @json_decode(json_encode($object), true);
4}
5