4

My project was working just fine till few hours ago. Some routes still working and some stopped. I tried to delete the new modification I made but the problem persists!!!!! For example, this route used to go to index() method at the guest controller and returns a gust view of activities, and still working fine:

Route::get('activities', 'guestController@showguestactivities');

and this line of code used to go to index() method at the activities controller, but for now it returns just whit-blank page:

Route::resource('admin/activities', 'activitiesController');

I tried to return just a string like that:

Route::get('admin/activities', function(){return 'Just string for Activiteis';});

but it returns the white page again. I found that there is a conflict happening with this resource:

Route::resource('admin', 'adminController');

once I remove it, every thing else works. But I need this resource and I can't just delete it.

Any help will be appreciated.

Dr. MAF
  • 1,853
  • 1
  • 27
  • 45

2 Answers2

5

It seems that the order is of importance. If you register admin/activities before admin it should work fine:

Route::resource('admin/activities', 'activitiesController');
Route::resource('admin', 'adminController');
lukasgeiter
  • 147,337
  • 26
  • 332
  • 270
  • Alright alright you're welcome :) But please delete the [new question you created](http://stackoverflow.com/q/27730869/1903366)! – lukasgeiter Jan 01 '15 at 12:55
0

I think it should be

Route::get('admin/activities', 'activitiesController@index');

instead of

Route::resource('admin/activities', 'activitiesController');
Sajad Karuthedath
  • 14,987
  • 4
  • 32
  • 49
  • yes,of course, it works fine. but I need to access the whole controller (edit, update, store....etc) in a normal way . – Dr. MAF Jan 01 '15 at 12:19