2017 © Pedro Peláez
 

library laravel-share-fix

Get back the share method in Laravel 5.4

image

daltcore/laravel-share-fix

Get back the share method in Laravel 5.4

  • Thursday, March 16, 2017
  • by RamonSmit
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,124 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Laravel 5.4 package share fix

Laravel 5.4 compatible, (*1)

Will give back the functionality thats taken out in 5.4:, (*2)

share Method Removed

The share method has been removed from the container. This was a legacy method that has not been documented in several years. If you are using this method, you should begin using the  singleton method instead:

$container->singleton('foo', function () {
    return 'foo';
});
composer require daltcore/laravel-share-fix dev-master

Change in your bootstrap/app.php, (*3)

$app = new Illuminate\Foundation\Application(
    realpath(__DIR__ . '/../')
);

to, (*4)

$app = new DALTCORE\ShareFix\Application(
    realpath(__DIR__ . '/../')
);

Now you can use $this->app->share again., (*5)

The Versions

16/03 2017

dev-master

9999999-dev

Get back the share method in Laravel 5.4

  Sources   Download

MIT

16/03 2017

v1.0.0

1.0.0.0

Get back the share method in Laravel 5.4

  Sources   Download

MIT