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

having trouble with cakePHP Bake and one of the database tables

I am using Bake to create models for my database tables. I have run into a little problem. I have 25 tables .... I strated baking the models until for one of the database tables the bake started giving a name of it own to the model,file and…
Annibigi
  • 5,895
  • 5
  • 23
  • 21
0
votes
1 answer

How to change app path on the fly from a custom task?

I'm creating a project that consists on calling 'bake project' (using DispatchShell) from inside a task. The problem is, after I bake it, how do I get the app path to change from the current path to the newly baked one so I can automatically run…
Caio Oliveira
  • 151
  • 1
  • 7
0
votes
1 answer

Vendor bake plugin function definition changes

A colleague is cloning a repo and getting the following error when running bake commands through our own plugin: PHP Fatal error: Declaration of OurPlugin\Command\ModelCommand::findBelongsTo(Cake\ORM\Table $model, array $associations): array must…
TechFanDan
  • 3,329
  • 6
  • 46
  • 89
0
votes
1 answer

how to setup environment of 'cake bake' for multiple applications?

I am stuck in setting up environment for running cake bake. In my development machine (using WAMP), I have several applications: /{wwwroot} /myapp-1 /myapp-2 /myapp-3 According to some tutorial online, in order to use 'cake' in command…
crab
  • 508
  • 6
  • 6
0
votes
1 answer

Overriding ControllerTask using plugin

I would like to produce an extra view file, inside the model's template folder when I bake a controller. I've copied (unchanged yet) ControllerTask.php into plugins/WetKit/src/Shell/Task in my plugin. For instance, for the model Entries, I would…
TechFanDan
  • 3,329
  • 6
  • 46
  • 89
0
votes
1 answer

Multiple PHP and console warnings when using Bake in Cake

guys. I've been trying to bake some models, controllers, and views in CakePHP 1.3 - however, when I run the command from console, I've been running into a lot of warnings and unexpected behavior. For instance, if I attempt to bake a model with…
user677526
0
votes
1 answer

Baked Entity Policies for underscore_named models

I have a question about Cake's bake for policies on models/entities named with underscore_names. I have an app the uses Authentication and Authorization middleware, but baking the authorization policies for entities and tables on models with…
dividedbyzero
  • 181
  • 2
  • 13
0
votes
1 answer

Unable to get Bake Console working and all answers are outdated

I have a CakePHP project in C:/xampp/htdocs/cms2 I'm trying to use bake console, but when I run "bin/cake" in the command prompt it says that 'bin' is not recognized as an internal or external command, operable program or batch file. I followed…
Subnom
  • 57
  • 2
  • 11
0
votes
1 answer

Loading a baked Plugin Model fails with "Table class for alias Data.History could not be found"

I baked a model into a plugin, but it fails to load. What I did: Baked a model bin/cake bake model History --connection data --plugin Data --no-rules --no-validation --table elements_history One moment while associations are detected. Baking…
ᴍᴇʜᴏᴠ
  • 4,804
  • 4
  • 44
  • 57
0
votes
2 answers

cannot bake CakePHP - permission denied while setting chmod +x for cake/console/cake - on NTFS mounted partition

Just learning CakePHP and its Bake feature. I tried to run ../cake/console/cake bake from the app folder, but I get the error ../cake/console/cake: Permission denied chmod 777 nor chmod +x don't work. I still get permission denied. Also tried…
Obay
  • 3,135
  • 15
  • 55
  • 78
0
votes
1 answer

Policy related cakePHP bake command does't work(in my case)

I am working on cakePHP (version 4.0.5) and when I tried to run bin/cake bake policy --type entity Name command, It'll gives an error . Error: Unknown option type. Can anyone encounter such problem and have any solution,kindly share...
0
votes
1 answer

cakephp 4 - Authentication component not found when bake a new controller

I cannot use cake bake, I have an error relative to the authentication component. The application use this component. What I have missed ? Here is the full log: bin/cake bake controller styles 1 ↵ Baking…
dype
  • 500
  • 1
  • 4
  • 15
0
votes
1 answer

Getting a error when tring to bake it. #cakephp

tried creating small DB and to bake it. but getting an error. c:\xampp\htdocs\cakeBlog>bin\cake bake Exception: Plugin DebugKit could not be found. In [C:\xampp\htdocs\cakeBlog\vendor\cakephp\cakephp\src\Core\PluginCollection.php, line 140]
Sanka
  • 13
  • 2
0
votes
1 answer

Rename DB Fields after Bake

i realised (after baking and much customisation) that i can use DB fields called 'created' and 'modified' (as long as the are type Datetime and default NULL) to get built in functionality to save 'created on date' and 'modified on date' saved to DB…
Vauneen
  • 147
  • 3
  • 13
0
votes
1 answer

CakePHP Bake from different templates when using prefix

When I currently use ./cake.bat bake template Genres or ./cake.bat bake template Genres --prefix admin, then the templates are used from these…
1 2 3
8 9