Coder Social home page Coder Social logo

abreeden / laravelfivepackagebridges Goto Github PK

View Code? Open in Web Editor NEW

This project forked from morrislaptop/laravelfivepackagebridges

0.0 2.0 0.0 161 KB

Provides a bridging trait and multiple bridges that allows Laravel 4 packages to be used in Laravel 5

Home Page: https://github.com/morrislaptop/LaravelFivePackageBridges

License: MIT License

PHP 100.00%

laravelfivepackagebridges's Introduction

Laravel Five Package Bridges

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:

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.

laravelfivepackagebridges's People

Contributors

abreeden avatar morrislaptop avatar plakhin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.