PHP - Laravel 4- Resource Controller Missing Method

There's a problem with Laravel 4, since i have updated it. I have no idea why its calling a missing Method error, where there's no problem with my resource nor my routes

     * Handle calls to missing methods on the controller.
 *
 * @param  array   $parameters
 * @return mixed
 */
public function missingMethod($parameters)
{
    throw new NotFoundHttpException;
}

It calls this when i call

api/user/4

or when i call

api/users/all

There should be no problem since i've done this in my routes

Route::resource('api/user','UserApiController');
Route::resource('photo','PhotoController');

Would anyone please do help me on this menial problem?

EDIT

here's the actual website www.codify.ph

api calls are as follow

www.codify.ph/api/users/all?skip=0&take=10

here's the github repository (yes we're open source) https://github.com/philippine-devnet/codify

Upvotes: 2

Views: 2907

Answers (2)

I actually understood it already,

For Laravelists out there, you should have your routes on the following format

any route registration with

Route::resource("/") or Route::controller("/")

should be below or after any controllers and routes, for some reason the route naming ends with the /

example

Route::group(array('before'=>'authed', 'prefix'=>'dashboard'), function() 
{
    Route::resource('users','UserDashboardController');
    Route::resource('clients','ClientDashboardController');
    Route::controller('/', 'DashboardController');
});

notice that the "/" is at the very last.

Upvotes: 2

yowmamasita
yowmamasita

Reputation: 4960

Remove

app/storage/meta/services.json

Upvotes: 0

Related Questions