Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
commande oil generate admin... doesn't work
  • Hi
    I'm doing the build-an-admin-panel-with-the-fuel-php-framework tuto by Philip Sturgeon but when I do this command oil generate admin posts title:string slug:string summary:text body:text user_id:int I've got the following error
    Usage:
    php oil [g|generate] [controller|model|migration|scaffold|views] [options]
    Runtime options:
    -f, # Overwrite files that already exist
    -s, # Skip files that already exist
    -q, # Supress status output
    -t, # Speak errors in a robot voice
    Description:
    The oil command can be used to generate MVC components, database migrations
    and run specific tasks.
    Examples:
    php oil generate controller [ | |..]
    php oil g model [: |: |..]
    php oil g migration [: |: |..]
    php oil g scaffold [: |: |..]
    php oil g scaffold/template_subfolder [: |: |..]
    Note that the next two lines are equivalent:
    php oil g scaffold...
    php oil g scaffold/default...
    Documentation:
    http://fuelphp.com/docs/packages/oil/generate.html I looked on doc but didn't find anything useful, does anyone know where does it com from?
  • Which version of FuelPHP are you using? Admin generation is a new feature that requires 1.1 (for both the core and all packages used).
  • my version is 1.1-rc1, I installed it last week
  • v1.1-RC1 was tagged on October 18th. The admin feature is from two weeks ago. Please upgrade to v1.1. (should be seamless coming from RC1).
  • thanks the commande admin is working with the version v1.1
    now i've a new problem, I can't log to the admin, I 've mamp and I could not fix the trouble with 'oil refine migrate', even with the troubleshooting doc, I think there is an error on my table users because I created myself, do you know where I can find an example of this table.
    thanks
  • I guess Phil has to answer this...
  • I hash the password and then I could enter the admin, I did it with this code
    $password_to_db = Auth::instance()->hash_password($plaintext_password);
    it's not nice but it'll do it by the time I finish the administartion tutorial and changr mamp on my computer
  • Would it be possible for anyone to share the finished project (of the tutorial)?
    As I can't seem to get the oil commands to work. PS: Happy new year btw :)
  • This is on a fresh install, using 1.1/develop:
    $ php oil generate admin posts title:string slug:string summary:text body:text user_id:int
    Creating controller: /data/www/vhosts/fuel.catwoman.local/fuel/app/classes/controller/base.php
    Creating controller: /data/www/vhosts/fuel.catwoman.local/fuel/app/classes/controller/admin.php
    Creating views: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/template.php
    Creating views: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/dashboard.php
    Creating views: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/login.php
    Creating migration: /data/www/vhosts/fuel.catwoman.local/fuel/app/migrations/002_create_posts.php
    Creating model: /data/www/vhosts/fuel.catwoman.local/fuel/app/classes/model/post.php
    Creating controller: /data/www/vhosts/fuel.catwoman.local/fuel/app/classes/controller/admin/posts.php
    Creating view: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/posts/index.php
    Creating view: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/posts/view.php
    Creating view: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/posts/create.php
    Creating view: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/posts/edit.php
    Creating view: /data/www/vhosts/fuel.catwoman.local/fuel/app/views/admin/posts/_form.php

    So I would like to know what doesn't work in your case...

Howdy, Stranger!

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

In this Discussion