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
1 answer

bake cakephp configure console profile

i've just installed CakePHP and I'm pretty new with Mac,Shells and Terminal.. Cakephp is now running correctly and as stated by my tutorial (Beginning-Cakephp-from novice to professional) i'm now trying to configure console profile to run Bake (i'm…
luca
  • 36,606
  • 27
  • 86
  • 125
0
votes
1 answer

How do I install cakephp bake on my hosting

I've managed to install and use cake bake with xampp, but I have no idea how to install bake with my command line on the hosting. The error I get is: CakePHP 3.4.4 Red Velvet already installed. Can anyone give me some directions? Thanks.
Erik180486
  • 1
  • 1
  • 5
0
votes
0 answers

CakePHP 3 prefix (admin) bake templates

Can anyone tell me where/how to save the new bake template for prefix routing? When I bake a controller with --prefix Admin it creates the Controller/Admin/controller.php file from the Template/Bake/Controller/controller.php file instead of from the…
Lucky
  • 95
  • 1
  • 7
0
votes
1 answer

Cakephp 3.x bake - get cli options inside templates

In Cakephp 3.x when baking e.g. templates for admin I run. bin/cake bake template Posts --prefix admin This works fine and files are generated successfully, however how inside bake' templates can I check if that prefix option is set or not. I need…
dav
  • 8,931
  • 15
  • 76
  • 140
0
votes
1 answer

Baking a Controller with Cakephp 3.2 using SQLite3 produces an error in the add() and edit() methods, Why is the code being generated incorrectly?

The error is that when creating the controller code a variable for an associated model is left blank, and that Model's name is left blank. The error happens when creating the controllers for all of my tables, but here is a complete example of one…
0
votes
0 answers

CakePHP 3.x error when running bin\cake bake all comments

I am having issues trying to bake a table I created in my database. I am on Windows 10 and as you can see below, running php 5.5.12 (which is higher than the required 5.5.9 or greater). I am also running cake version 3.2.6. I originally had a field…
Battousai
  • 503
  • 7
  • 17
0
votes
2 answers

Parse error: syntax error, unexpected T_STRING While Cake Bake Model

I'm getting Parse error: syntax error, unexpected T_STRING while i cake bake model because the model generated has single quotes not closed like ' Photo' => array( 'className' => 'Photo', 'foreignKey' =>…
Meabed
  • 11
  • 1
0
votes
1 answer

CakePHP 3.0 baking in netbeans

I am using CakePHP 3.0 for my first project and using Netbeans IDE. I downloaded CakePHP 3 plugin from github : junichi11. Project is running well in browser. But unable to use bake command. On running bake command from right click on project >>…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

cakephp3 bake console don't bake

I installed xampp7 and composer3 and I got cakephp3.1 with composer. Everything was ok and I saw cakephp homepage. Then I tried to start baking with this codes. composer require --dev cakephp/bake:~1.0 and then cake bake But it gives me an…
mitra razmara
  • 745
  • 6
  • 10
0
votes
2 answers

CakePHP one to many Combo box

Hey I have two models User and City, where a user belongs to a city and a city has many users. On the city table I have city_id and city_name. I've used used cake bake and created the user model and when I add a new user the combos box under the…
Yarin Miran
  • 3,241
  • 6
  • 30
  • 27
0
votes
1 answer

How can I correctly relate these tables in cakephp?

I'm trying to create a set of CRUDs using cakephp3. My database model looks like this: I used the cake's tutorial on authentication to create the users table and it's classes, it's working fine. But I want to use a more complex set of roles, so I…
Bruno Lamps
  • 544
  • 6
  • 27
0
votes
1 answer

Cake 3.x How do I trigger a bake template in another vendor?

cake version: 3.1.2 crud version: 4.2.0 Inside vendor/cakephp/bake/src/Shell/Task, there is a ControllerTask.php code here Inside vendor/cakephp/bake/src/Template/Bake/Controller, there is a controller.ctp code here Inside…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
0
votes
2 answers

How AutoGenerate classes with cakePHP 2.7.x?

Seems like there is no documentation regarding it anywhere. any assist will be appreciated.
yossi
  • 3,090
  • 7
  • 45
  • 65
0
votes
1 answer

CakePHP bake console bake all error line 40: exec: php: not found

am new to CakePHP 2.7.3 and running Linux Mint 17. I tried out the bake command after creating my database but each time i run ./projects/school/app/Console/cake bake all I get the error message../lib/Cake/Console/cake: line 40: exec: php: not…
Rodgers Ouma
  • 103
  • 2
  • 13
0
votes
1 answer

cakePHP 3.0.7 - Baked edit function fails to perform save in patchEntity with Marshaller::merge() error

A Baked edit function on the members table dies with exception inside ->patchEntity just before save with the following error: Argument 1 passed to Cake\ORM\Marshaller::merge() must implement interface Cake\Datasource\EntityInterface, integer…
Jack
  • 79
  • 7
1 2 3
8 9