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:

127 questions
8
votes
7 answers

CakePHP Bake Shell Error: Database connection “Mysql” is missing, or could not be created

I have an issue here with baking. I've read the previous answers to similar questions, but the solutions seem to not apply here. I can't bake because the error I receive is: Database connection “Mysql” is missing, or could not be created If I run…
Dan Hanly
  • 7,621
  • 12
  • 67
  • 127
7
votes
1 answer

CakePHP: -bash: cake: command not found

I've used CakePHP a few times before but this is the first time I'm trying out Bake. On my Mac I'm running CakePHP 1.3, PHP5.3.3, and MySQL. I've created my database tables and the app connects to the database. I navigate to the console folder. and…
iamjonesy
  • 23,004
  • 39
  • 130
  • 203
5
votes
1 answer

CakePHP3 - Reverse (delete) generated (baked) controller

I generated (baked) controller via terminal command: bin/cake bake.bake controller [controller_name] Is there a command to reverse it? To delete generated controller?
Kunok
  • 5,543
  • 8
  • 38
  • 72
5
votes
1 answer

Bake tool cannot see tables in SQLite3 database

I am trying to build a simple app with CakePHP 2.1.1 using SQLite3 as the database. To save time I tried to use the bake tool to create a model for the following table: CREATE TABLE animals ( id integer primary key autoincrement, name…
Johan A.
  • 53
  • 4
4
votes
3 answers

How to bake admin (prefixed) code with CakePHP 3?

Can anyone tell me what is the official way to create CRUD for admin back-end? In CakePHP 2 the baked code was extended with 'admin_' before the function names and for the view files. In CakePHP it seems I can't find any direct information on how…
Lucky
  • 75
  • 1
  • 7
4
votes
1 answer

CakePHP v3.x how to bake without database connection

I'm using CakePHP v3.x and my app doesn't have any models but I'd like to back a couple views or controllers. $ bin/cake bake template Reports I tried: * using the --connection option with false or an empty string * Removing Datasources from…
emersonthis
  • 30,934
  • 52
  • 191
  • 328
4
votes
2 answers

Bake every table in CakePHP?

The database I'm working on has more than 100 tables, so I'm not going to sit here baking a model and controller for each one individually. I would like to bake all of the tables at the same time with something like the .xml files in Hibernate that…
NobleUplift
  • 4,577
  • 6
  • 37
  • 76
4
votes
1 answer

CakePHP cakebake on linux

Can Any Body Suggest me how to bake the cake in CakePHP 2.x on linux What I have tried $ cd MyProject/app/Console $ ./cake bake it give me this line, don't know how to proceed from here Welcome to CakePHP v2.1.3…
jsduniya
  • 2,376
  • 6
  • 26
  • 43
4
votes
4 answers

right way to install cakephp-scripts for v2.2.1?

I am using ubuntu and as per instruction I use 'apt-get isntall cakephp-scripts' I am using latest stable release of cake v 2.2.1, but when I run cake bake -app , I always get console for v1.3.2 Why do I get CakePHP v1.3.2 Console on cakephp v…
Harshit
  • 1,177
  • 18
  • 38
3
votes
3 answers

Getting CakePHP 2.0 to Bake

I'm having some trouble getting the Bake feature of CakePHP 2.0 working.. I think it is down to the way I've got my folder structure set-up, i.e: htdocs is the site's root, which contains everything normally found in the 'app' folder. The…
Daniel Hollands
  • 5,111
  • 3
  • 21
  • 36
3
votes
2 answers

Bake Models - CakePHP - Ubuntu

I am currently trying to bake models for a project in CakePHP. I have set up my database tables and baked my skeleton project. I then execute the following via terminal: cake bake -app /home/gary/glecto/ Which then display's me the correct menu.…
GaryDevenay
  • 2,320
  • 2
  • 18
  • 39
3
votes
1 answer

Cake doesn't not bake all templates

I have created 3 database tables which follows the CakePHP naming convensions. When I try to bake the code with the following command it generates only 3 files in the 'App/src/Template/Worksheets' which is 'view', 'add' and 'edit'. i.e bin\cake…
Da_programmer
  • 149
  • 1
  • 14
3
votes
2 answers

cake console 2.2.1: Bake errors

OSX machine running MAMP. CakePHP 2.2.1 installed and configured properly (meaning that I have all green bars when I browse to the Index.php file, I have completed the Blogs tutorial and am working on my second app with which scaffolding is up and…
user1572358
  • 33
  • 1
  • 4
2
votes
1 answer

cakephp bake console acting weird?

I'm pretty new to CakePHP and i'm running through both the Cake Book and the Apress Book CakePHP from novice to professional, but i can't seem to understand what's going on on my bake console. I've got it installed and seems to work fine. But when i…
moraleida
  • 424
  • 5
  • 21
2
votes
1 answer

how do we bake for lookup fields on cakephp?

I am exploring CakePHP's bake function and I used the latest CakePHP (3.6.1) followed some tutorials to bake the MySQL structure and it worked fine except that I expected the related fields with a foreign key constraint on my table need to be…
Minilik
  • 81
  • 9
1
2 3
8 9