Support the ongoing development of Laravel.io →
Configuration Views
Last updated 1 year ago.
0

Try to remove <?php and ?>

Last updated 1 year ago.
0

darwinluague9001 said:

Try to remove <?php and ?>

If its removed I get even more errors as shown below. http://imgur.com/dDMe8iF

I searched around on the net but I don't see anyone having the same issues as me.

One question at this point of time; are the php tags not supposed to be there?

Thank you!

Last updated 1 year ago.
0

did you save you file as blade.php file like "filename.blade.php"

Last updated 1 year ago.
0
Solution

to get it to work you need to remove the PHP tags and pass $users to the view

in your controller do something like

$users = User::all();
return View::make('myview', array('users' => $users));
Last updated 1 year ago.
0

darwinluague9001 said:

did you save you file as blade.php file like "filename.blade.php"

Yup. Its currently saved as users.blade.php, exactly what the tutorial stated. Its my first PHP framework so I didn't want to deviate away.

zenry said:

to get it to work you need to remove the PHP tags and pass $users to the view

in your controller do something like

$users = User::all(); return View::make('myview', array('users' => $users));

Oh my god it freaking works! Thank you both for your help and being patient, darwinluague9001 and zenry!

*Edit: But I wonder why I encountered this problem while strictly following the tutorial to the very last letter.. weird.

Last updated 1 year ago.
0

the tutorial, although not a real tutorial, states the following

https://www.dropbox.com/s/bggom68ga7o74m6/Screenshot%202014-06...

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bhbh bhbh Joined 6 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.