Code Monkey home page Code Monkey logo

Comments (5)

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Hooking bundles in Laravel 4 is a little different than in Laravel 3.
You need to do two things :

  • First : Hook the Former service provider to Laravel, it's the equivalent of the old start.php file, it binds routes, config, models etc to Laravel. You need to go in app/config/app.php and add Former\FormerServiceProvider in the providers array. This is the equivalent of adding Former to your bundles.php file in Laravel 3.
  • Second : As in Laravel 3 it will hook Former to Laravel but it will still be in its namespace, so you need to add the Former facade to Laravel, by adding Former\Facades\Former to the aliases array in the very same file. This step is the same than in Laravel 3 excepted that you reference a Facade instead of the actual class.

from former.

dmlogic avatar dmlogic commented on May 30, 2024

Thanks for that. Progress, but a new error message

Fatal error: Class 'Underscore\String' not found in
/path/to/vendor/anahkiasen/former/src/Former/Helpers.php on line 35 

Do I need to do something similar for other dependencies? I don't see a service provider in Underscore so I guess it works a bit different

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Update Composer, I worked a lot on Underscore last night, some classes moved, and I forgot to update Former as it depends on Underscore.

from former.

dmlogic avatar dmlogic commented on May 30, 2024

that's got it. thank you

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

I updated the README on the composer branch while I was at it :)

from former.

Related Issues (20)

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.