read

Development of FuelPHP has come a long way since Dan and myself started work on the system a few months ago and it’s command line utility has progressed amazingly. I spent all of yesterday polishing off this package and now we have Rails-style scaffolding and migrations working perfectly. This video shows off the basic functionality of Oil by running through scaffolding creation and quickly brushing on migration work.

</embed>

You can see here I have created a basic controller with template support, my model, all of my basic views, the schema and even run the schema just by using two commands:

$ php oil generate scaffold monkey name:varchar[100] biography:text favourite_number:integer
$ php oil refine migrate

I could then deploy this code ( maybe with git) and run the migrate command on the live server and those features would be live!

If you are not used to this way of working it borrows heavily from Rails which I have been doing a fair bit of work with recently. I don’t want to start  massive PHP vrs Ruby argument because there is nothing new to be said here, but suffice it to say we don’t always have the option to work with Ruby. FuelPHP is taking ideas from Rails in how the command line utility works and helping to speed up PHP development. For me that is pretty exciting!

I’ll be posting more screencasts soon focusing on other aspects of Oil, covering the console and migrations in more detail. I’ll also be working on a write-up for setting up Readline for PHP so you can interact with the Oil Console like it is part of bash.

Blog Logo

Phil Sturgeon

Phil has contributed to CodeIgniter, FuelPHP, Laravel and handfuls of other projects, to try and make the PHP community a better place.


Published

Build APIs You Won't Hate

Everyone and their dog wants an API, so you should probably learn how to build them.

Buy it from LeanPub for $26.99


Published 01 Feb 2014

Image

Phil Sturgeon

Founder of PyroCMS, Senior Developer at Ride, Programming Polyglot, PHP-FIG member, and occasionally gets chased by bears

Back to Overview