LukeTowers
LukeTowers

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/

daftspunk
daftspunk

Great job!

LukeTowers
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?

LukeTowers
LukeTowers

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?

LukeTowers
LukeTowers

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.

1-7 of 7