morrislaptop / laravel-five-package-bridges
Use your Laravel 4 packages in Laravel 5
Installs: 17 776
Dependents: 1
Suggesters: 0
Security: 0
Stars: 34
Watchers: 5
Forks: 9
Open Issues: 0
Requires
- laravel/framework: ~5.0
Requires (Dev)
- camroncade/timezone: dev-master
- cartalyst/sentry: ~2.1
- intervention/image: ~2.0
- itsgoingd/clockwork: ~1.6
- laracasts/flash: ~1.3
- maatwebsite/excel: ~1.2
- orchestra/testbench: ~3.0@dev
- phpunit/phpunit: ~4.4
- robbiep/cloudconvert-laravel: ~2.0@beta
- way/generators: ~3.0
Suggests
- camroncade/timezone: Addon to assist with Timezone managemenr
- cartalyst/sentry: A framework agnostic authentication & authorization system. http://www.cartalyst.com
- intervention/image: PHP Image Manipulation http://image.intervention.io
- itsgoingd/clockwork: Server-side component of Clockwork, a Chrome extension for PHP development.
- laracasts/flash: Easy flash notifications https://packagist.org/packages/laracasts/flash
- maatwebsite/excel: An eloquent way of importing and exporting Excel and CSV files for Laravel with the power of PHPExcel http://www.maatwebsite.nl/laravel-excel/docs
- robbiep/cloudconvert-laravel: Provides API access to CloudConvert.com
- way/generators: Rapidly speed up your Laravel workflow with generators https://packagist.org/packages/way/generators
Replaces
- illuminate/support: ~4.2
This package is auto-updated.
Last update: 2024-10-26 03:50:46 UTC
README
This Laravel package provides a bridging trait and multiple bridges that allows Laravel 4 packages to be used in Laravel 5.
Current packages that are bridged are:
- laracasts/flash
- way/generators
- intervention/image
- maatwebsite/excel
- itsgoingd/clockwork
- cartalyst/sentry
- robbiep/cloudconvert-laravel
- camroncade/timezone
- laracasts/utilities
If you want to build a bridge, please follow the contributing guide.
Installation
Begin by installing this package through Composer.
composer require morrislaptop/laravel-five-package-bridges
Once this operation completes, add the config service provider, this brings the package() method back to the config repository. Open app/config/app.php and add..
'Morrislaptop\LaravelFivePackageBridges\ConfigServiceProvider',
Then we need to swap the core Application class with the bridging, this adds various methods like after() back. Open bootstrap/app.php and replace..
$app = new Illuminate\Foundation\Application( realpath(__DIR__.'/../') );
with
$app = new Morrislaptop\LaravelFivePackageBridges\Application( realpath(__DIR__.'/../') );
The final step is to add the bridged service providers instead of the raw service providers.
Open app/config/app.php, and add lines as appropriate.
'Morrislaptop\LaravelFivePackageBridges\Bridges\FlashServiceProvider',
'Morrislaptop\LaravelFivePackageBridges\Bridges\GeneratorsServiceProvider',
'Morrislaptop\LaravelFivePackageBridges\Bridges\ImageServiceProvider',
'Morrislaptop\LaravelFivePackageBridges\Bridges\ExcelServiceProvider',
'Morrislaptop\LaravelFivePackageBridges\Bridges\ClockworkServiceProvider',
'Morrislaptop\LaravelFivePackageBridges\Bridges\SentryServiceProvider',
Voila! Those packages now work as they always did in Laravel 4.
Custom Packages
If you have a private package you can simply create your own bridging service provider and bring in the trait from this package.
<?php namespace App\Bridges; use Morrislaptop\LaravelFivePackageBridges\LaravelFivePackageBridgeTrait; use Acme\Private\NuclearServiceProvider as BaseNuclearServiceProvider; class NuclearServiceProvider extends BaseNuclearServiceProvider { use LaravelFivePackageBridgeTrait; }
Contributing
Please see the contributing guide.