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

Lumen Support #2

Closed
PabloPG opened this issue Aug 16, 2017 · 8 comments
Closed

Lumen Support #2

PabloPG opened this issue Aug 16, 2017 · 8 comments
Assignees

Comments

@PabloPG
Copy link

PabloPG commented Aug 16, 2017

How i can install this in Lumen?

@eagostini eagostini changed the title Lumen Lumen Support Aug 17, 2017
@eagostini
Copy link
Member

eagostini commented Aug 17, 2017

Hey @PabloPG! It's something to be worked around as I struggled to enable Blade as a facade over Lumen 5.4 (believe me, I've tried many things). It might be related to laravel/lumen-framework#504. Anyway, I found a way to do it:

Enable Facades in Your Lumen Project

In your bootstrap/app.php ensure you have the following:

$app->withFacades();

Service Provider Registering

As Lumen does not support package auto-discovery you got to do it manually in your bootstrap/app.php:

$app->register(Parsedown\Providers\ParsedownServiceProvider::class);

Considerations

Be sure you're not displaying views under caching running php artisan cache:clear. I will update the service provider to load the facade directly from Illuminate\Support\Facades\Blade instead of \Blade as Lumen apparently is not handling it properly (check referred issue). That should be enough. I will keep you up to date as would be good to have some instructions for Lumen in our README.md as well.

@eagostini eagostini self-assigned this Aug 17, 2017
@eagostini
Copy link
Member

It's now implemented and will come up in the next release, today yet.

@PabloPG
Copy link
Author

PabloPG commented Aug 23, 2017

@eagostini Sorry it took me so long to reply.

Thanks.

@marlonob
Copy link

Hello! I followed the steps here, but I get an error when I try to use it in a blade view (like in @parsedown('hello')). It gets me “Call to undefined function resolve()” and points to the view without a line number.

I’m using Lumen 5.5.2 and parsedown/laravel 1.0

@eagostini
Copy link
Member

Hi @zorrillodepeluche, I will take a look at this to try to reproduce your scenario. I am currently off for some days. As soon as I can I will come back to you.

@eagostini
Copy link
Member

The helper resolve is not present in Lumen anymore. That's why the issue came up. I will be releasing a fix for that very soon.

@eagostini eagostini reopened this Jan 9, 2018
@eagostini
Copy link
Member

Hi @zorrillodepeluche, I've just released a fix for your issue. Thanks for reporting!

@marlonob
Copy link

marlonob commented Feb 9, 2018

Can confirm that version 1.1 is working in Lumen as expected. Thank you.

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