0
votes

I have used Laravel Boilerplate for development of my application. Beside that I have installed L5Modular with it. So i define the route Like following inside my Modules

<?php

Route::group(array('module' => 'test', 'middleware' => ['web','auth'], 'prefix'=>'frontend','namespace' => 'App\Modules\test\Controllers'), function() {

    Route::resource('test', 'TestController');

}); 

But when i tried to access the route http://localhost/blog/public/test/create it's showing 404 Error.

Why my route not accessed? is there any error of defining route?

2
Laravel doesn't support being installed in a subdirectory out of the box, you'll need to customise the .htaccess file. - apokryfos
you also needed to show the content of TestController - online Thomas

2 Answers

-1
votes

You need to configure a virtual host to get laravel working, that's quite easy and even easier if you're using any software such as MAMP or XAMPP.

If you're on a MAC I'd suggest to have a look at laravel valet: you'll have your web server running in seconds.

If you don't want to do any of this, you'll have to change a few things in order to get Laravel working in a sub directory.

-1
votes

You might forget to write frontend prefix to URL. Try to access by:

http://localhost/blog/public/frontend/test/create