ImagePalette icon indicating copy to clipboard operation
ImagePalette copied to clipboard

Update ImagePaletteServiceProvider.php

Open manticorp opened this issue 8 years ago • 5 comments

This makes it compatible with the current latest version of laravel, which removed the share method from the application container.

manticorp avatar Feb 01 '17 09:02 manticorp

@manticorp I tried your update but it isn't working for Laravel 5.3 and 5.4. I had to change it to:

$this->app->singleton('image-palette', function () {
	return new Client;
});

akempes avatar Mar 29 '17 16:03 akempes

Yes this is true actually - the array access set doesn't set a shared binding, but a call to singleton does - nicely spotted.

manticorp avatar Mar 29 '17 16:03 manticorp

One more thing: To support Laravel 5 you need to remove the line $this->package('brianmcdo/image-palette');. In fact the whole boot function may be removed.

akempes avatar Mar 29 '17 19:03 akempes

Aha fair game - thanks for the heads up - have again updated :)

manticorp avatar Mar 29 '17 19:03 manticorp

Thanks for the FAST updates! This last update also fixes issue #6.

I hope this pull request is merged soon!

akempes avatar Mar 29 '17 19:03 akempes