Questions tagged [cakephp-bake]

Code generation tool for CakePHP framework.

Bake is a code generation tool for CakePHP framework, which lets users easily generate application components (according to CakePHP's interpretation of "MVC" design pattern) from CLI.

For further research:

125 questions
0
votes
0 answers

Using default MySQL values with scaffolding in CakePHP

I have a MySQL table with a field (varchar) with a default value like "#ffffff". To use this default I know that I can use a snippet like this: $item_details =…
Michael
  • 621
  • 5
  • 17
0
votes
1 answer

Additional common actions for bake

What is better way to bake an additional common actions (like enable, moveup, movedown and other) additionally to index, view, add, edit, delete? Is there a trick that I have missed in the manuals? Or proper way will be modify…
imagra
  • 21
  • 2
0
votes
1 answer

"cake bake" returns "env: node: No such file or directory"

I'm experienced with Ruby but new to PHP, getting CakePHP set up on my machine and I would love some help. I've downloaded a version of Cake and placed it at /Users/zack/Sites/cake From that directory, I've done cd cake/console and tried running…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
0
votes
1 answer

Cakephp - change baked files default directory

By default doing cake bake the files are placed in directory according to cake conventions. E.g. when baking views for PostsController my add, edit, index and view files will be under app/View/Posts. Instead of that I want to have all my actions in…
dav
  • 8,931
  • 15
  • 76
  • 140
0
votes
1 answer

Problems with CakePHP shell in Ubuntu 14.04

could somebody explain why this: sudo Console/cake works when I am inside path/to/cakeproject/app while this: sudo cake absolutely does NOT work whe I am inside path/to/cakeproject/app/Console? Actually, understanding this would be simply a first…
lucasnadalutti
  • 5,818
  • 1
  • 28
  • 48
0
votes
1 answer

Changing view file extension -via cake bake

Is there a way to change the extension of the view files generated by cake bake view? Presently, the task generates .ctp files -whereas I want .php. I tried using the alias argument @ cake bake view MyController index "index.php", however CakePHP…
jtrumbull
  • 818
  • 9
  • 19
0
votes
2 answers

How to custom cake bake in CakePHP v 3.0.0-RC2

After run composer.json I go edit : C:\xampp\htdocs\cakephp\src\Console; C:\xampp\mysql\bin; C:\xampp\php; In run cmd go in htdocs run cake bake C:\xampp\htdocs>cake bake 'cake' is not recognized as an internal or external command, operable …
Ahmed MR-mody
  • 61
  • 1
  • 6
0
votes
2 answers

using custom models, inheriting from baked models in CakePHP

Community, From other MVC-Frameworks / persistance-APIs, such as hibernate in the java world, I am aware of a best-practice mechanism to inherit from the generated model structure and use these inherited models as DAOs in your application. I…
TurbuLenz
  • 45
  • 1
  • 9
0
votes
1 answer

Form select options access desire field from foreign key table in cakephp 3.x.x

In my Project I have items table this contain two foreign Keys locations_id and categories_id. When i add new item, cateogries_id appear categories.name in add.ctp : select options (foreign) Key is display Id. I want to appear at location select…
Ye Htun Z
  • 2,079
  • 4
  • 20
  • 31
0
votes
1 answer

Facing troubles baking associations in cakephp 2.5.5.12

I am new to cakephp and fail to understand what i am doing wrong while baking . i use the cakephp/app path to bake my blog which has two tables : posts Id-integer set to auto increment and primary key Title Body Created Modified comments id-integer…
taawanzad
  • 13
  • 4
0
votes
1 answer

how to get string from array in cakephp?

I want to insert data in cakephp from add from. I got array in $this->request->data['ProductValue'] at controller. My array is: Array ( [0] => Array ( [title] => Deepak1 [value] => Option1 ) [1] => Array ( …
0
votes
1 answer

Multiple relationships to a single model for Cake bake

I'm trying to bake a database, one of the tables is a messaging table, created with the following query: CREATE TABLE `rally`.`privatemessages` ( `id` INT NOT NULL AUTO_INCREMENT, `user_id_from` INT NULL, `user_id_to` INT NULL, `content` TEXT…
0
votes
1 answer

reverse database won't work from terminal (PROPEL / BAKE CAKEPHP)

I've been trying to generate model classes from a local database using both propel and bake for cakephp , it seems that i have the same problem : When I try to acces the database through bake or propel it gives me an error that it can't open the…
Boukharist
  • 1,219
  • 11
  • 19
0
votes
0 answers

No output from Cake Bake on Bluehost

I've got two CakePHP sites on a single Bluehost account (shared hosting), and have been trying to bake with both, but whenever I execute the command, the terminal gives no output and hangs permanently until its aborted with Ctrl+C. I'm certain the…
user782161
  • 63
  • 6
0
votes
1 answer

CAKE BAKE is returning a html output on console

I'm just installed a brand new cake, and when i try to bake the app, this is what i get when a try to cake bake all. if i create a new app folder from the bake, it works fine. Cant find why its outputting html in my console: >…
1 2 3
8 9