Skip to content

Instantly share code, notes, and snippets.

@dogmatic69
Created March 3, 2011 22:58
Show Gist options
  • Save dogmatic69/853805 to your computer and use it in GitHub Desktop.
Save dogmatic69/853805 to your computer and use it in GitHub Desktop.
[public_html master] $ cake bake
PHP Warning: Module 'inclued' already loaded in Unknown on line 0
Welcome to CakePHP v1.3.7 Console
---------------------------------------------------------------
App : public_html
Path: /var/www/sites/phpwm-cakephp.dev/public_html
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
> m
---------------------------------------------------------------
Bake Model
Path: /var/www/sites/phpwm-cakephp.dev/public_html/models/
---------------------------------------------------------------
Possible Models based on your current database:
1. Convention
Enter a number from the list above,
type in the name of another model, or 'q' to exit
[q] > 1
Would you like to supply validation criteria
for the fields in your model? (y/n)
[y] > y
Field: id
Type: integer
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[28] >
Field: title
Type: string
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[19] >
Would you like to add another validation rule? (y/n)
[n] >
Field: description
Type: text
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[28] > 19
Would you like to add another validation rule? (y/n)
[n] >
Field: date
Type: date
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[8] >
Would you like to add another validation rule? (y/n)
[n] > n
Field: created
Type: datetime
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[28] >
Field: modified
Type: datetime
---------------------------------------------------------------
Please select one of the following validation options:
---------------------------------------------------------------
1 - alphanumeric
2 - between
3 - blank
4 - boolean
5 - cc
6 - comparison
7 - custom
8 - date
9 - decimal
10 - email
11 - equalto
12 - extension
13 - inlist
14 - ip
15 - maxlength
16 - minlength
17 - money
18 - multiple
19 - notempty
20 - numeric
21 - phone
22 - postal
23 - range
24 - ssn
25 - time
26 - url
27 - userdefined
28 - Do not do any validation on this field.
... or enter in a valid regex validation string.
[28] >
Would you like to define model associations
(hasMany, hasOne, belongsTo, etc.)? (y/n)
[y] > n
---------------------------------------------------------------
The following Model will be created:
---------------------------------------------------------------
Name: Convention
DB Table: `conventions`
Validation: Array
(
[title] => Array
(
[notempty] => notempty
)
[description] => Array
(
[notempty] => notempty
)
[date] => Array
(
[date] => date
)
)
---------------------------------------------------------------
Look okay? (y/n)
[y] >
Baking model class for Convention...
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/models/convention.php
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/models/convention.php`
Baking test fixture for Convention...
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/tests/fixtures/convention_fixture.php
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/tests/fixtures/convention_fixture.php`
Bake is detecting possible fixtures..
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/tests/cases/models/convention.test.php
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/tests/cases/models/convention.test.php`
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
> c
---------------------------------------------------------------
Bake Controller
Path: /var/www/sites/phpwm-cakephp.dev/public_html/controllers/
---------------------------------------------------------------
Possible Controllers based on your current database:
1. Conventions
Enter a number from the list above,
type in the name of another controller, or 'q' to exit
[q] > 1
---------------------------------------------------------------
Baking ConventionsController
---------------------------------------------------------------
Would you like to build your controller interactively? (y/n)
[y] > y
Would you like to use dynamic scaffolding? (y/n)
[n] > y
---------------------------------------------------------------
The following controller will be created:
---------------------------------------------------------------
Controller Name:
Conventions
var $scaffold;
---------------------------------------------------------------
Look okay? (y/n)
[y] > y
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/controllers/conventions_controller.php
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/controllers/conventions_controller.php`
Bake is detecting possible fixtures..
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/tests/cases/controllers/conventions_controller.test.php
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/tests/cases/controllers/conventions_controller.test.php`
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
> v
---------------------------------------------------------------
Bake View
Path: /var/www/sites/phpwm-cakephp.dev/public_html/views/
---------------------------------------------------------------
Possible Controllers based on your current database:
1. Conventions
Enter a number from the list above,
type in the name of another controller, or 'q' to exit
[q] > 1
Would you like bake to build your views interactively?
Warning: Choosing no will overwrite Conventions views if it exist. (y/n)
[n] > y
Would you like to create some CRUD views
(index, add, view, edit) for this controller?
NOTE: Before doing so, you'll need to create your controller
and model classes (including associated models). (y/n)
[y] >
Would you like to create the views for admin routing? (y/n)
[n] > n
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/index.ctp
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/index.ctp`
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/view.ctp
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/view.ctp`
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/add.ctp
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/add.ctp`
Creating file /var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/edit.ctp
Wrote `/var/www/sites/phpwm-cakephp.dev/public_html/views/conventions/edit.ctp`
---------------------------------------------------------------
View Scaffolding Complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment