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

thiago9438
thiago9438

How can i add an laravel package in october? the package is: https://github.com/jenssegers/Laravel-Agent.

Thanks!

alxy
alxy

Create a plugin and install it via composer in your plugins folder. (Instructions can be found directly in the github repository.)

Then you can add the service provider and the alias like this: https://github.com/scottbedard/oc-debugbar-plugin/blob/master/Plugin.php#L34-L39 (This is basically the same as if you would add it in the config/app.php).

If you installed your october installation using composer, you can also do it eactly as described in the readme.

Scott
Scott

This plugin might be what you're looking for https://github.com/scottbedard/oc-useragent-plugin

Last updated

thiago9438
thiago9438

Scott said:

This plugin might be what you're looking for https://github.com/scottbedard/oc-useragent-plugin

Thanks man!!

JeffGoldblum
JeffGoldblum

For future reference I've written a 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/

Mr Hound
Mr Hound

LukeTowers said:

For future reference I've written a 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/

Hi Luke,

To be sure ... I need to add this package restoore/laravel-systempay to my plugin.
This package file composer.json use the "laravel/framework" package in it's require section.

Thus we can find several times the dependencies of laravel in different vendor's plugins directory.
Is it the good way anyway ?

JeffGoldblum
JeffGoldblum

@MrHound: No; you are supposed to call composer update from your project root not your plugin root so that you pull the plugin dependencies into your project's vendor directory not your plugin's.

minh.ho10835
minh.ho10835

hi Luke,

I try to use your plugin oc-passport-plugin in our deployed octobercms(build 434, laravel 5.5.*), but i have an issue regarding to Auth: Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Auth\Factory] is not instantiable.

could you please have a look at this issue.

Thanks, Steven

JeffGoldblum
JeffGoldblum

It's currently not working due to the differences between October's Auth system and Laravel's Auth system, note that I mention it's a work in progress and not suitable for use: https://github.com/LukeTowers/oc-passport-plugin#about

minh.ho10835
minh.ho10835

LukeTowers said:

It's currently not working due to the differences between October's Auth system and Laravel's Auth system, note that I mention it's a work in progress and not suitable for use: https://github.com/LukeTowers/oc-passport-plugin#about

Thanks you, i will try another solutions. another question, do you have plan to make it work on October in the future?

Regards, Steven

JeffGoldblum
JeffGoldblum

Probably eventually, if you want you could sponsor it to make it a higher priority for me to do sooner.

Mr Hound
Mr Hound

LukeTowers said:

@MrHound: No; you are supposed to call composer update from your project root not your plugin root so that you pull the plugin dependencies into your project's vendor directory not your plugin's.

Hi Luke,

I've got some problems trying to use the tzsk/collage package in my plugin.

  Problem 1
    - Installation request for tzsk/collage ^3.0 -> satisfiable by tzsk/collage[3.0.0].
    - tzsk/collage 3.0.0 requires php ~7.2 -> your PHP version (7.3.11) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.

I've also try with your bootPackages() method without success!

How to get ride of this concern?

JeffGoldblum
JenniferLopez
JenniferLopez

@Mr Hound In addition to @LukeTowers' suggestion above, if you know your PHP environment will work with your PHP dependencies, you can also run composer update --ignore-platform-reqs to get Composer to skip the PHP version and extension checks.

1-14 of 14

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