GithubHelp home page GithubHelp logo

Error about former HOT 13 CLOSED

formers avatar formers commented on July 17, 2024
Error

from former.

Comments (13)

JohnCHarrington avatar JohnCHarrington commented on July 17, 2024

That was me being silly, whoops! But now I'm just getting this: ErrorException: Catchable Fatal Error: Argument 1 passed to Former\Framework\Nude::__construct() must be an instance of Illuminate\Container, instance of Illuminate\Foundation\Application given, called in /Applications/MAMP/Web/Sites/LearnLaravel/vendor/anahkiasen/former/src/Former/FormerServiceProvider.php on line 36 and defined in /Applications/MAMP/Web/Sites/LearnLaravel/vendor/anahkiasen/former/src/Former/Framework/Nude.php line 20

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

So you're using the Composer branch I gather ? Show me your code so I can assure you the syntax is right (since the docs haven't been updated yet) ?

from former.

JohnCHarrington avatar JohnCHarrington commented on July 17, 2024

Yes, Composer, and I haven't adjusted to the proper Former syntax yet, just using the errr...former one lol! So it looks like this:

Former::open('admin/posts', 'POST');
Former::label('title', 'Title');
......
Former::close();

The docs seem to say that should work, but maybe it's changed

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

No I meant to switch framework, what command did you go with ?

from former.

JohnCHarrington avatar JohnCHarrington commented on July 17, 2024

Former::framework(null); at first, I then went into config and set it to null, but soon realised it should be 'Nude'.

Then I got the other error...

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

Ok I think this might have to do with the recent changes to Laravel 4, I'll update the package see if nothing got broke in the process.

from former.

JohnCHarrington avatar JohnCHarrington commented on July 17, 2024

That is likely as earlier today I had a very similar error on meido/form because it an old version which didn't work with the latest L4! Fixed now though :)

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

Ok updated Former, should work now.

from former.

chrissm79 avatar chrissm79 commented on July 17, 2024

Is Former::framework() required if a config.php has been compiled?

Unless I set the framework ( i.e., Former::framework('TwitterBootstrap') ), I get the following error:

FatalErrorException: Error: Using $this when not in object context in /Users/chris7519/Sites/Laravel/Former/vendor/anahkiasen/former/src/Former/FormerServiceProvider.php line 35

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

Sorry, that was unrelated. Should work now.

from former.

chrissm79 avatar chrissm79 commented on July 17, 2024

Perfect! Thanks!!

from former.

Anahkiasen avatar Anahkiasen commented on July 17, 2024

No problem. :)

from former.

JohnCHarrington avatar JohnCHarrington commented on July 17, 2024

Well, now that everything works I have to say Former is absolutely amazing!!
Former::populate(); is one of the biggest timesavers I have ever seen, dramatically simplifies building forms, I love 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.