at this point, all the logic is in the routes-file using closures. it looks like this:
Route::get('users', function()
{
$users = User::all();
return View::make('users.index')->with('users', $users);
});
nothing fancy at all
I know, it does not actually say this now.. I just tried it, as a sort of "desperate" attempt, before nagging at forums ;)
AnasT said:
@extends('layouts.default.blade')
as it stands now:
@extends('layouts.default')
@section('content')
<h1>All users</h1>
@if ($users->count())
@foreach ($users as $user)
<li>{{ link_to("/users/{$user->username}", $user->username) }}</li>
@endforeach
@else
<p>There are no users in the database!</p>
@endif
@stop
I restarted apache, and now it actually works :S sorry about that :/
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community