Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil Scaffolding with plural nouns
  • Very new to FuelPHP, so apologies if this is a known issue.

    When issuing the following command:

    php oil g scaffold series name:string desc:text image:text

    Oil autogenerates all of the required scaffolding. However, the pluralizer in use correctly identifies that 'series' is already and only a plural noun. This does however cause issues in the views/series/index.php view, as the for loop becomes

    <?php foreach ($series as $series): ?>

    As you can imagine, this does not function as it should.

    I've since chosen a different name, but is this a known issue? Documented somewhere I might have missed?

    Cheers.

    Paul
  • HarroHarro
    Accepted Answer
    Not much we can do about that.

    The convention for generation is that you use singular words to generate, and not a plural one.
  • Fair enough. It'd be useful if this was stated on the 'Oil > Generate' docs page, as I imagine scaffolding is one of the big reasons people switch to FuelPHP (and as such will probably land up on that docs page).
  • Good point, Oil docs in general are in need of improvement.

    We've been looking for someone willing to take that on, we're a bit short-staffed at the moment.
  • I'd love to if I knew what I was doing! :) Really appreciate the effort you guys put in though, seriously taking the tedium out of web apps.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion