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
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
  • 171
  • 11
2
votes
1 answer

Cakephp 3 - make bake command require presence for foreign keys

I have a table with a foreign key defined in it. After running the cake bake command, I got correctly generated the table file. That is, the references ( hasMany, belongsTo, etc. ) are included in the file. Al required fields defined as not null in…
user1077915
  • 828
  • 1
  • 12
  • 26
2
votes
1 answer

unable to make bake work with cakePhp 3.2

I'm trying to create new local project with cakephp 3.2, following the cakephp doc, on wamp local server. I used composer to install it. Everythings seems ok after installation : I configure my db access on app.php and the cakephp default homepage…
2
votes
2 answers

Cake PHP Fatal Error (256)

I have just created an application using cake bake and when I run it I get the screen that says 'Sweet, myApp got baked' but there are no styling on it and at the bottom I get the following error: Fatal Error (256): ConnectionManager::getDataSource…
user387687
  • 31
  • 1
  • 2
2
votes
1 answer

Cant bake from cakephp app folder on windows 8

I have a default cakephp project i used on a lot of projects on win 7, now im trying to use it to bake on win 8. Im using Xampp for apache/php and cakephp 2.0. I have defined the system variables on…
Renato Probst
  • 5,914
  • 2
  • 42
  • 45
2
votes
1 answer

cakephp 3 postgres 9.4 driver bake

I want to generate models with bake terminal command. CakePhp 3 is able to connect to my postgres database. All PHP extensions for postgres are activated (php_pdo_pgsql, php_pgsql). I checked php.ini. When I run the command: cake bake model I have…
gestrem
  • 21
  • 1
  • 2
2
votes
1 answer

Please help me to get the dynamic id of the record in the listing of the records in Cakephp 2.3.9

I used bake to make cms of the settings table. It contains three fields. Column Type Null Default id int(11) No key varchar(10) No value varchar(200) No And it have 3 records. All create functionality is working fine. But delete and…
Parag Kuhikar
  • 485
  • 2
  • 6
  • 17
2
votes
1 answer

Cake 2.3 Bake with Postgres 8.4 - No tables in the database?

I am trying to use Postgres (8.4) instead of MySQL for a new project, because of the super spiffy PostGIS 2.0 features that are available. I am using the Turnkey LAPP server, so Cake 2.3.7 is up and running and can connect to my…
DirtyBirdNJ
  • 574
  • 10
  • 26
1
vote
2 answers

CakePHP Bake Error: Database connection "Mysql" is missing, or could not be created

I'm looking for some help to get rid of this error. As i'm running mac os x 10.5 I had to install A newer version of php to support pdo. I did this using Marc Liyanage's installer package. The problem I'm having now is that using php from the…
Ralphonz
  • 633
  • 1
  • 9
  • 22
1
vote
1 answer

how to creating php template file

controller $data["controller"] = $table; $data["rows"] = $this->base_model->get();//get table attributes and names $write_add = $this->load->view("generate/add",$data,TRUE);//load file into var $file_vadd =…
li9ht
  • 465
  • 5
  • 11
1
vote
1 answer

cakephp: cake bake created no validation rules, why?

I used the cake bake model all, with my db (cakephp 1.3) which created all models with associations, but no validation rules were created. why is that?
yossi
  • 3,090
  • 7
  • 45
  • 65
1
vote
1 answer

CakePHP 4 Bake Custom TemplateCommand in Plugin

I cannot seem to override TemplateCommand from my plugin. Original TemplateCommand located here: vendor/cakephp/bake/src/Command/TemplateCommand.php namespace Bake\Command; ... class TemplateCommand extends BakeCommand {...} I stored mine here:…
TechFanDan
  • 3,329
  • 6
  • 46
  • 89
1
vote
1 answer

CakePHP 3 bake model with same table name from different datasource

I'm using CakePHP 3. I have different sources to use and each having a different users table. In short, I'm creating a master panel to manage users from all other applications. When I bake users table from a different connection bin/cake bake model…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
2 answers

Can Laravel generate all mvc skeleton out of an existing table like that of cakephp's command cake bake all

I found laravel very interesting. But I'm wondering if there's any artisan command to generate all MVC skeleton files provided a database table all at ones. And how about separate generation of especially the model, given the table structure? or is…
Minilik
  • 171
  • 11
1
vote
1 answer

Cake Bake error

i am trying to use cakes baking console and when i use cake bake model all i am getting the following error Attendance Table Structure CREATE TABLE IF NOT EXISTS `mydb`.`attendences` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT , `dateTime`…
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
1
2
3
8 9