Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Add support for Lumen #34

Closed
notflip opened this issue Feb 28, 2020 · 5 comments
Closed

Add support for Lumen #34

notflip opened this issue Feb 28, 2020 · 5 comments

Comments

@notflip
Copy link

notflip commented Feb 28, 2020

No description provided.

@dweidner
Copy link
Owner

Haven't tested it yet. If I remember correctly, the registration of the service providers is handled differently in Lumen. Could be a good idea to add Lumen support.

@dweidner dweidner changed the title Does this work with Lumen? Add support for Lumen Mar 8, 2020
@dweidner
Copy link
Owner

dweidner commented Mar 8, 2020

Unforunately it does not work with Lumen at the moment.

You can register the GoutteServiceProvider in bootstrap/app.php but Lumen does not provide the required helper function config_path() which results in an undefined function call.

Should be easy though to fork the project and create an adaptation for Lumen.

@TheAliAbbasi
Copy link

probably adding this would make it compatible with lumen
https://gist.github.com/mabasic/21d13eab12462e596120

@dweidner
Copy link
Owner

dweidner commented Mar 20, 2020

I tend to take the same approach as Laravel Scout. Lumen does not provide a default location for configuration files, like Laravel does. But with this change you would be able to provide the path to your configuration in the AppServiceProvider of your Lumen project:

// ./app/Providers/AppServiceProvider.php
namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app['path.config'] = base_path('config'); // Path to your configuration directory
    }
}

I will prepare an update and some additional notes for the README.

@dweidner
Copy link
Owner

Added Lumen support in the latest release (1.5.0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants