Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Problem with Creating Controllers in subfolders
  • I just tried creating the follwoing:

    php oil g api_discover

    ...and got the folder structure correctly but the views in the controller where wrong. It generated:

    class Controller_Api_Discover extends Controller_Template { public function action_index()
    {
    $this->template->title = 'Api discover » Index';
    $this->template->content = View::factory('api_discover/index');
    } }

    Instead of

    class Controller_Api_Discover extends Controller_Template { public function action_index()
    {
    $this->template->title = 'Api discover » Index';
    $this->template->content = View::factory('api/discover/index');
    } }

    Is this a bug?
  • Hey come on guys, you can't just imagine new features then call it a bug when it doesn't work. I have been doing some work on sub-folder scaffolding so oil g scaffold foo/bar name:string should be fine.
  • It's a bug. I submitted a pull request for the fix. You can find working code here: https://github.com/calvinfroedge/oil/blob/master/classes/generate.php Note that using this code, you'd create like this: oil generate controller classdir/classname view update delete

Howdy, Stranger!

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

In this Discussion