0

I got this code in the routes.php:

Route::get('/', array('as' => 'home', function()
{
    return View::make('list.open');
}));

Route::get('room/{name}', array('as' => 'showRoom', 'uses' => 'RoomController@showRoom'));

Route::post('room', array('as' => 'openRoom', 'uses' => 'RoomController@openRoom'));

And this code in the RoomController.php:

class RoomController extends Controller {

    public function openRoom()
    {
      return "test";
    }

    public function showRoom($name)
    {
      return "test2";
    }
}

If I open public/ it will Show me the view list.open but if I open public/room/test it throw the NotFoundHttpException. (I also tried to use directly a function in the routes.php instead of the roomcontroller but it doesnt worked)

Can anyone help me?

Kind regards Damon

Damon_Kronski
  • 17
  • 1
  • 8

2 Answers2

0

You don't need to add the public folder to your path, you can just go to http://location.com/room/test.

Jerodev
  • 32,252
  • 11
  • 87
  • 108
0

I just reinstalled a new larapack and deleted the old one... I've to start from Zero but now it works.

Damon_Kronski
  • 17
  • 1
  • 8