maybe this is obvious, but if you wan to use users
variable in view:
@foreach($users as $user)
// some code
@endforeach
then in route (or controller) you should you should pass users
not user
:
// should be
return View::make('users')->with('users',$users);
// not
return View::make('users')->with('user',$users);
Also I would rather put User::all() in route/controller then in model, because like mentioned in comment by Muharrem Tigdemir - it is already declared in Eloquent. It would look something like this:
Route::get('users', function()
{
return View::make('users')->with('user', User::all());
});
Hope it helped.