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

CakePHP Migration CreateTable Fail

I am going to learn bake migration command in cake php, so I created a table named product by bin/cake bake migration CreateProduct and bin/cake migration migrate To make this again as training, I dropped this table by drop table product and…
KAEDE
  • 340
  • 3
  • 10
0
votes
0 answers

Localize cakephp bake templates

I'm creating CakePHP 3 localized app and want to generate all backend part with bake for multiple languages. I'm already familiar with i18n shell and .po files, I have used cakephp/localized and it's ok. It have translations of cake core for many…
Yaroslav
  • 2,338
  • 26
  • 37
0
votes
1 answer

Accessing array of variables in CakePHP bake script?

I'm trying to modify the CakePHP bake script so that I can incorporate saving of images from an image helper in an appropriately named field. How do I go about getting the list of fields/variables in my model? I see that the $modelObj object is…
Jamie Chapman
  • 4,229
  • 5
  • 29
  • 47
0
votes
0 answers

How can I change Database columns display (label) in the views in CakePHP 3?

I did it in the past, but i don't remember how. I'm using Bake to create some CRUD. In the view page (list page), it show all the columns with database field names. How can I hide some columns and change the displays?
0
votes
1 answer

Having trouble getting cake bake to work

I've installed the latest version of CakePHP on a Ubuntu 10.10 machine. I was able to run through a beginner tutorial just fine so I think my configuration is close to being correct. I can't get cake bake to completely work though. Below is my…
Mark Murphy
  • 1,580
  • 1
  • 16
  • 29
0
votes
1 answer

bin/cake doesn't create association

I have 2 tables and I want to create association between them, however bin/cake doesn't do it correctly. CREATE TABLE `teams` ( `id` int(11) NOT NULL AUTO_INCREMENT, `joiningID` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `name`…
modivno
  • 37
  • 7
0
votes
1 answer

cakephp 3: bake adds undesired rule "$rules->isUnique(['email'])"

I am baking a table that saves all the attempts to login from my customers, and by some reason the bake command adds this rule. $rules->isUnique(['email']) This is undesired, because I want to save all the data sent during each loging attempt. It…
Josexato
  • 50
  • 6
0
votes
1 answer

Is it possibile customize the actions added by bake (CakePHP 3)?

I want to be able to bake controllers and views without using the "view" action. Is there any parameter or way to skip or even customize the actions for bake commands?
Tomas Gonzalez
  • 1,124
  • 15
  • 33
0
votes
0 answers

Cake Bake generated code (scaffolding) resulting in syntax error

Cake Bake generated the following code snipped: public function index() { $this->paginate = [ 'contain' => ['Users'] ]; $shops = $this->paginate($this->Shops); $this->set(compact('shops')); } The result is the error message:…
elMeroMero
  • 752
  • 6
  • 18
0
votes
0 answers

Cake PHP 3.4 error when bake a model

I've Cake PHP 3.4 application on PHP 5.6. When I try to bake a mode like this sudo bin/cake bake model my_table it gives below error. Exception: Plugin WyriHaximus/TwigView could not be found. in…
Miuranga
  • 2,463
  • 10
  • 51
  • 81
0
votes
3 answers

CakePHP Default Bake Paths :: Can they be changed?

I recently downloaded a Cake site from a live server, and I am trying to bake some aspects. But I am getting files not found errors (even though they do exist), but the structure is different that the out-of-box CakePHP download. So I am wondering…
OldWest
  • 2,355
  • 7
  • 41
  • 61
0
votes
2 answers

Baking tables in cake php

Im baking tables in cakephp. One table named abc which I baked successfully and I need to remove this table from database and also from the cakephp folder. I deleted all models, controllers, views and test fixture for that table. But due to some…
samir chauhan
  • 1,543
  • 1
  • 17
  • 42
0
votes
0 answers

changing cakephp folder bake not run

I copied my cakephp project in new folder and after that I changed folder`s name. but when I run cake bake form 'myNewProjectFolder/bin/' it use database connection info from old folder!! another problem is it make nothing! not at all! and it do not…
afsane
  • 1,889
  • 6
  • 25
  • 40
0
votes
1 answer

Cannot use 'Bake\Shell\CommonOptionsTrait' for command 'common_options_trait' it is not a subclass of Cake\Console\Shell

I have installed cakephp 3.5 via composer and tried to setup a migration file using cake bake. But got following error: Cannot use 'Bake\Shell\CommonOptionsTrait' for command 'common_options_trait' it is not a subclass of Cake\Console\Shell. in…
Sumit Parakh
  • 1,098
  • 9
  • 19
0
votes
2 answers

Cakephp Problems with the bake script

I have apache, php, and Mysql installed on my computer. I have added the PHP directory and C:\Apache\htdocs\cake\cake\console to my environmental variables path. When i load the path to the console on my CLI it loads cake.php then i type cake bake…
1 2 3
8 9