Closed fgvicente closed 7 years ago
@fgvicente we have just released one new version 2 days ago. Can you check with the latest version ? There are significant changes in inputs as well.
Hello, I have the same problem on Laravel 5.2. My composer: "infyomlabs/laravel-generator": "5.2.x-dev"
I am generating using --fromTable flag
@janbolat Can you post your table schema here ?
@mitulgolakiya here it is:
CREATE TABLE IF NOT EXISTS companies
(
id
int(11) NOT NULL AUTO_INCREMENT,
name
varchar(250) NOT NULL,
address1
varchar(100) DEFAULT NULL,
address2
varchar(100) DEFAULT NULL,
city
varchar(100) NOT NULL,
state
char(2) NOT NULL,
zip
varchar(15) NOT NULL,
county
varchar(250) DEFAULT NULL,
lat
decimal(9,6) DEFAULT NULL,
lng
decimal(9,6) DEFAULT NULL,
phone
varchar(25) NOT NULL,
email
varchar(100) NOT NULL,
facebook_url
varchar(100) DEFAULT NULL,
comments
mediumtext,
rating
float(3,2) NOT NULL DEFAULT '0.00',
rating_count
int(11) DEFAULT '0',
created_at
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at
timestamp NULL DEFAULT NULL,
deleted_at
timestamp NULL DEFAULT NULL,
balance
decimal(15,2) DEFAULT NULL,
teaser
varchar(255) DEFAULT NULL,
description
text,
logo
varchar(1000) DEFAULT NULL,
project_photo
varchar(100) DEFAULT NULL,
start_year
year(4) DEFAULT NULL,
route_name
varchar(250) DEFAULT NULL,
is_licensed
tinyint(1) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1643 ;
command:
php artisan infyom:scaffold Company --fromTable --tableName=companies --prefix=admin --views=index,create,edit,show --primary=id --save
Hi, This is triggered when trying to use htmlType: checkbox. There's another exception if you try to use htmlType: radio:
[ErrorException] explode() expects parameter 2 to be string, array given
Also, maybe related, if I try to use "radio,Yes,No" or "checkbox,yes" the input doesn't appears on the form.
Thanging the htmlType to text, for example, works correctly.
@underdpt @fgvicente Can you check checkbox
stuff again ?
We had a missing support for just checkbox
. But I have added that. For more fields usage, you can refer docs here
Hi @mitulgolakiya
I've just tested this:
ErrorException in e5511076451202ffe26162509f862ef77cf8acfa.php line 69: Use of undefined constant yes - assumed 'yes' (View: D:\desarrollos\canaldenuncias\web\resources\views\admin\empresas\fields.blade.php) (View: D:\desarrollos\canaldenuncias\web\resources\views\admin\empresas\fields.blade.php)
Thanks!
@underdpt get the latest version of core-templates. It should fix a problem. I just fixed it sometime ago.
Hmmm. It didn't work, but I've double-checked and I've downloaded that latest commit.
I found a resources\infyom\infyom-generator-templates\scaffold\fields\checkbox.stub
without the fix applied. I've tried to republish without luck. I don't know where it's comming from and why it's in use. Any hint?
I'm using an AdminLTE template (Josh).
It works for me now that I've synced the published templates with the newest updates of the package. ¡Thanks!
php artisan infyom:api_scaffold monitores Specify fields for the model (skip id & timestamp fields, we will add it automatically) Enter "exit" to finish
Field: (field_name:field_database_type) []:
Enter field html input type (text): [text]:
Enter validations: []:
Is Searchable (y/N): []:
Field: (field_name:field_database_type) []:
Enter field html input type (text): [text]:
Enter validations: []:
Is Searchable (y/N): []:
Field: (field_name:field_database_type) []:
Migration created: 2016_08_27_033234_create_monitores_table.php
Model created: monitores.php
Repository created: monitoresRepository.php
Create Request created: CreatemonitoresAPIRequest.php
Update Request created: UpdatemonitoresAPIRequest.php
API Controller created: monitoresAPIController.php
monitores api routes added.
RepositoryTest created: monitoresRepositoryTest.php
TestTrait created: MakemonitoresTrait.php
ApiTest created: monitoresApiTest.php
Create Request created: CreatemonitoresRequest.php
Update Request created: UpdatemonitoresRequest.php
Controller created: monitoresController.php
Generating Views... table.blade.php created index.blade.php created
[ErrorException]
Array to string conversion ????