Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil, Scaffolding, Modules, Generate, Admin
  • Hi everyone,

    I wish know how to can create or load modules on admin method.

    I have the admin controllers defined and a simple auth created.
    I want create modules and include thats into admin options, using oil command to generate controllers, models and views of modules.

    If i need add manually the modules on any place for load into admin method. how i do add this?

  • HarroHarro
    Accepted Answer
    Generated admin controllers should popup in the generated admin page automatically? 
  • Harro, yes.
    For say an example, if i do

        oil generate admin pages -> this pages is only in admin page

    if i do

        oil generate blog -> this pages is not in admin page, else is on public access.

    now i need add comments to admin page with something same that

        oil generate admin comments

    I explain me?

  • HarroHarro
    Accepted Answer
    I don't think I understand what your problem is, that all looks fine to me?
  • This line
        oil generate admin comments

    Not work. i get error this error

    Uncaught exception Oil\Exception:  [...]  fuel/app/classes/controller/base.php already exists, use -f or --force to override.
  • HarroHarro
    Accepted Answer
    If you haven't modified that file, just use the -f flag.

    Every generate of an admin controller generates the base file, as it is shared between all admin controllers. The error is to make sure it doesn't get overwritted by accident if you have modified it.

    In hindsight it would probably have been better to reverse it, and to silenty skip unless -f was used...

Howdy, Stranger!

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

In this Discussion