apache_conf 如何在Laravel(5.3)中包含流明(5.3)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 如何在Laravel(5.3)中包含流明(5.3)相关的知识,希望对你有一定的参考价值。

1. Create a directory in laravel application called lumen

```
	lumen
		public
			.htaccess
			index.php
		config
			- api.php
			- jwt.php
		bootstrap.php 
```

2. Grab content from `bootstrap/app.php` and paste it into `lumen\bootstrap.php`

3. Replace  `App\Console\Kernel::class` with `App\Lumen\Console\Kernel::class`.

4. Comment out the current route `$app->group(['namespace' => 'App\Http\Controllers'],...`  and use the following route:

```php
$app->get('/', function () use ($app) {
    return $app->version();
});
```

5. Copy Lumen's `app` folder into Laravel's `app` folder as `Lumen`.

6. Update the namespace of `namespace App\` folder to `namespace App\Lumen\`.

7. In Laravel root folder, run `composer require laravel/lumen` to include Lumen package dependencies.

Now you may run in Laravel's public directory `php artisan serve` and Lumen's public folder `php -S localhost:9000` to serve both application. You should see Laravel and Lumen default.

以上是关于apache_conf 如何在Laravel(5.3)中包含流明(5.3)的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf Laravel:在子域名上

apache_conf htaccess laravel

apache_conf WraOS的Laravel .htaccess

apache_conf Laravel - 像老板一样修补(用PsySH)

apache_conf 重定向到Laravel的公用文件夹

apache_conf Laravel .htaccess具有安全性和优化功能