So I have a web application, say www.randomwebapp.com, and I want www.randomwebapp.com/laravelapp to point to a laravel app I have written. I've already figured out how to include my laravel app as a separate package and access classes within my laravel app, but I'm wondering how to actually go about rendering views/routing etc. I'm mainly concerned with how to actually start running the app (perhaps something to do with bootstrap/app.php or bootstrap/autoload.php).
Asked
Active
Viewed 1,931 times
1
-
Ammm... Make directory "./laravelapp" and copy your laravel app then configure webserver rewrite_base for that directory. Or I've not understood your question? – Alex Feb 06 '15 at 01:22
1 Answers
1
I'm assuming you're using the boilerplate laravel installation folder structure provided by https://github.com/laravel/laravel, and your two apps are truly separate and have no dependencies on each other.
I'm also assuming folder structure looks something like this:
+ /webroot
+ /app
+ ( other laravel folders )
+ /public
+ /vendor
+ index.php
+ /other-site-dir
I would simply rename public
to laravelapp
. You may have to edit your laravelapp/.htaccess
(formerly public/.htaccess
) file to not redirect to your domain root and direct to laravelapp/index.php
instead.
You may also have to rewrite our group all your routes into a Route::group('/laravelapp'...);
These are just off-the-cuff thoughts... If you have an example of your folder structure, it could help.

awei
- 1,154
- 10
- 26
-
this was helpful thanks. I ended up solving the problem by moving the public folder out of the laravel app into the root directory of my main application. – rsahai91 Feb 09 '15 at 23:58