This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

JeffGoldblum
JeffGoldblum

Several times while developing plugins for October, I've needed to include Laravel Packages in the plugin. The problem with doing this is that these packages assume that one will be able to configure them at a project level with things like config files for that specific package that get published to the config folder, or service providers and aliases that need to be registered with the application before you can use them.

I've written a blog post about how to deal with these packages within your October plugins in a clean and easy to use way. You can view the post here https://luketowers.ca/blog/how-to-use-laravel-packages-in-october-cms-plugins/

daftspunky
daftspunky

Great job!

JeffGoldblum
comlet21118
comlet21118

Hello LukeTowers,

Seems like an excellent solution. As a new comer, I do lack a lot of information on Laravel and October. So, perhaps my question is not pertinent. Even then, I decided to ask: What about the Blade and Laravel 5 packages? Any solution in this direction?

JeffGoldblum
JeffGoldblum

Are you talking about using Blade as a template language within October? That's been thoroughly discussed and the rationale behind why October doesn't use Blade is explained is in these links: https://github.com/octobercms/october/issues/863 https://octobercms.com/forum/post/why-twig

In regards to Laravel 5, October is on Laravel 5.1 LTS right now, not sure what exactly you're asking about it.

alxy
alxy

Does this approach work for all October installations, installed via composer or the web interface installer?

JeffGoldblum
JeffGoldblum

Yes. Plugins installed via the web interface come from the OctoberCMS marketplace, which automatically builds a vendor directory within your plugin from its composer.json before packaging it for delivery which means that installations that don't use composer will still receive the necessary dependencies neatly packed into the vendor directory of the plugin that gets installed via the web interface.

cuongvu25531
cuongvu25531

Hello Mr. Luke Towers, Do you have any Oauth2 plugin for October CMS? Or can we use Oauth2 Laravel Password for October CMS webapp? I need to use Fitbit API what is using OAuth2. Thank you very much.

JeffGoldblum
JeffGoldblum

OAuth2 implementation isn't very difficult to just do yourself using Guzzle to abstract the raw HTTP communications. I'm not aware of any fitbit specific wrappers for Laravel/October right now but perhaps you would be willing to pay me to build you one. Shoot me an email at octobercms@luketowers.ca if that's something that interests you.

1-9 of 9

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.