Support the ongoing development of Laravel.io →
posted 10 years ago
Views Blade
Last updated 1 year ago.
0

post your controller

Last updated 1 year ago.
0

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

Last updated 1 year ago.
0

@extends('layouts.default.blade')

Last updated 1 year ago.
0

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')

Last updated 1 year ago.
0

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

Last updated 1 year ago.
0

I restarted apache, and now it actually works :S sorry about that :/

Last updated 1 year ago.
0

kriwis said:

I restarted apache, and now it actually works :S sorry about that :/

In your origianl Post you have an typo "@extends('layouts.default.blade)" -> "@extends('layouts.default.blade')"

I had the same error ^^

Sorry for reactivating this old post ;)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

kriwis kriwis Joined 19 Mar 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.