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 RESTful Controllers

Brian Patterson
Brian Patterson
19,588 Points

Where are the public methods in the Controller?

There are no public methods in my controller. I am using Laravel 5.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MemberListController extends Controller
{
    //
}

1 Answer

Benjamin Larson
Benjamin Larson
34,055 Points

By default your controllers will not have any defined methods unless you use the --resource option.

php artisan make:controller MemberListController --resource

You can always create the methods yourself as needed. It's worth checking out the Laravel Docs on Resource Controllers .

Just a side note that since you are using Laravel 5.x, this course may be difficult to follow at times--to an extent that it may be worth it to reinstall an older version of Laravel. Many of the foundational principles of Laravel are the same, but those little differences can put an undue burden on learning something that's already confusing when you start.

Brian Patterson
Brian Patterson
19,588 Points

I seem to have worked things out so far with Laravel 5. Thanks for the reply Benjamin.

Brian Patterson
Brian Patterson
19,588 Points

How do I install an older version of Laravel?