mindtwo/lumen-wp-app
Lumen/WordPress App Container
This package contains a application file to use the Laravel-Lumen service container with some Laravel components inside of WordPress.
Install
Via Composer
$ composer require mindtwo/lumen-wp-app
Usage
Create a bootstrap/app.php file like this:
<?php
require_once dirname(__DIR__).'/vendor/autoload.php';
(new LumenWpApp\LoadEnvironmentVariables(
dirname(__DIR__)
))->bootstrap();
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/
$app = new LumenWpApp\Application(
dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
*/
$app->configure('app');
$app->configure('cache');
$app->configure('database');
$app->configure('filesystems');
$app->configure('logging');
$app->configure('services');
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
*/
return $app;
Inside your wp-config.php file:
/** Load Application */
$app = require_once(realpath(__DIR__ . '/../bootstrap/app.php'));
Inside your functions.php file:
$app->registerConfiguredProviders()->boot();
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email info@mindtwo.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
nilportugues/laravel5-json-api-dingo
Laravel5 JSONAPI and Dingo together to build APIs fast
1,498
30
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 5.4 | ^8.1 | ^10.0 | MIT | |
| 5.3.3 | ^8.1 | ^10.0 | MIT | |
| 5.3.2 | ^8.1 | ^10.0 | MIT | |
| 5.3.1 | ^8.1 | ^10.0 | MIT | |
| 5.3 | ^8.1 | ^10.14 | MIT | |
| 5.2 | ^8.1 | ^10.14 | MIT | |
| 5.1 | 8.1 | ^10.14 | MIT | |
| 5.0 | 8.1 | ^10.14 | MIT | |
| 4.1 | ^8.1 | ^10.0 | MIT | |
| 4.0 | >=8.0.2 | ^9.21 | MIT | |
| 3.1 | >=7.4 | ^8.0 | MIT | |
| 3.0.2 | ^7.3 | ^8.0 | MIT | |
| 3.0.1 | ^7.3 | ^8.0 | MIT | |
| 3.0 | ^7.3 | ^8.0 | MIT | |
| 2.0.3 | ^7.2 | ^7.0 | MIT | |
| 2.0.2 | ^7.2 | ^7.0 | MIT | |
| 2.0.1 | ^7.2 | ^7.0 | MIT | |
| 2.0 | ^7.2 | ^7.0 | MIT | |
| 1.0.1 | ^7.2 | ^6.0 | MIT | |
| 1.0 | ^7.2 | ^6.0 | MIT |