Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Laravel Controllers Controller Overview

Starting second laravel project - what do I need to do?

Hi there,

I have successfully progressed throughout much of Hampton's tutorial and successfully built a working application with Laravel. Yay! I am now trying to start a second project called 'bookings', but when I navigate to http://laravel.dev:8000/bookings/ in my URL, I get an error message:

Sorry, the page you are looking for could not be found. NotFoundHttpException in compiled.php line 7693

When I navigate to http://laravel.dev:8000/, I see the index to my former project, 'todo-lists'. How can I get both of these URLs to point to my new project?

My code for my 'bookings' project so far:

// routes.php

Route::get('/', function () {
    return view::make('bookings.index');
});

Route::get('/bookings', function()
{
    return View::make('bookings.index');
})

Route::get('/bookings/{id}', function()
{
    return View::make('bookings.show')->withId($id);
})```

// index.blade.php

@extends('layouts.main') @section('content') <h2>Show All Bookings</h2>

Any advice would be great!
Thanks,

Robert Young
London, UK