I make a fresh setup of laravel on localhost (
/var/www/html/
) with commandcomposer create-project laravel/laravel moduleTesting --prefer-dist
.Then I move all the files inside folder to (
/var/www/moduleTesting/setup
), then move all the files from public folder(/var/www/moduleTesting/setup/public
) to moduleTesting folder(/var/www/html/moduleTesting
).I changed bootstrap file path in index.php file placed in moduleexample.dev folder(
/var/www/html/moduleTesting/
).require DIR.'/setup/bootstrap/autoload.php'; $app = require_once DIR.'/../../laravel_setup/bootstrap/app.php';
I also set the permission of folder
/var/www/moduleTesting/setup/bootstrap/cache
and/var/www/moduleTesting/setup/storage
Then I run command
composer dump-autoload
in terminal at (/var/www/moduleTesting/
).Then I try to run URL in the browser, and I see the welcome page of laravel app.
Then I install module package caffeinated/modules Begin by installing the package through Composer.
composer require caffeinated/modules
Once this operation is complete, simply add both the service provider and facade classes to project
/var/www/html/moduleTesting/setup/config/app.php
file:Service Provider
Caffeinated\Modules\ModulesServiceProvider::class,
Facade
'Module' => Caffeinated\Modules\Facades\Module::class,
After successful installation, I create a new module by command
make:module Admin
and follow easy steps steps and it created successfully and run by hitting URL http://localhost/moduleTesting/admin'.
Issue
Now the problem is when I run URL.'http://localhost/moduleTesting/admin' it runs successfully but when i run 'http://localhost/moduleTesting/admin'(add '/' only at the end of the same url) it does now work and redirect me to url 'http://localhost/admin'
Does anybody know, please help me how to solve this issue, On the same node if upload the setup on the server in a inner folder and run the same url it also redirect me.