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).
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
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:
I would simply rename
public
tolaravelapp
. You may have to edit yourlaravelapp/.htaccess
(formerlypublic/.htaccess
) file to not redirect to your domain root and direct tolaravelapp/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.