selahattinunlu / laravel-api-query-builder

Laravel & Lumen Api Query Builder Package
331 stars 66 forks source link

Lumen configuration file #5

Closed OskarD closed 8 years ago

OskarD commented 8 years ago

Thank you so much for Lumen compatibility!

Is there any way to allow for extending/modifying the functionality with Lumen? If not, some way to do that would be very useful.

selahattinunlu commented 8 years ago

You can change configuration at runtime.

Eg: app/bootstrap.php file

config()->set('api-query-builder.limit', 1);
config()->set('api-query-builder.orderBy', [
       [
            'column' => 'id',
            'direction' => 'desc'
        ]
]);

And you can access all configuration like this: config('api-query-builder')

I am glad if I can help you :)