Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Question rememberToken, enum and select? #99

Open
phillipmadsen opened this issue Sep 3, 2015 · 4 comments
Open

Question rememberToken, enum and select? #99

phillipmadsen opened this issue Sep 3, 2015 · 4 comments

Comments

@phillipmadsen
Copy link
Contributor

I am looking through your docs and I do not see the option for rememberToken, enum and select? Is this an option or can you tell me the way do make it with your --fields-file format

@mitulgolakiya
Copy link
Owner

select is supported. you can check fields format here

you need to add rememberToken manually after generator finishes with skipping migration at last. And also enum is not supported as of now.

@phillipmadsen
Copy link
Contributor Author

Also I try to use these and they do not output like they are supposed to.
FIELDS-FILE

{
     "field":"role_id:integer:unsigned:foreign:references,id:on,roles:onDelete,cascade",
      "type":"select",
      "validations": ""
},
{
      "field":"location:string",
      "type":"select:Surat,Mumbai",
      "validations": ""
}

OUTPUTS:

$table->integer('role_id')->unsigned()->foreign()->references('id')->on('roles')->onDelete('cascade');
$table->string('location');

💡 Maybe restructure it something like this:

FIELDS-FILE

{
     "field":"role_id:integer:unsigned: :references,id:on,roles:onDelete,cascade",
      "type":"foreign",
      "validations": ""
},
{
      "field":"location:select",
      "type":"options:Surat,Mumbai",
      "validations": ""
},
{
      "field":"location:enum",
      "type":"options:Surat,Mumbai",
      "validations": ""
},

💡 Idea: you could make new custom code for the rememberToken just like you do the --softDeletes
--rememberToken

or this

{
      "field":"remember",
      "type":"token",
      "validations": ""
}

💡 JUST IDEAS NOTHING MORE 💡

@mitulgolakiya
Copy link
Owner

remeberToken is done in develop branch.

@phillipmadsen
Copy link
Contributor Author

Thank you I am already using it. Perfect.
I have another you should add with the proposed above.

--innodb : Adds: $table->engine = 'InnoDB';

or

{
"field":"engine",
 "type":"innodb",
 "inTableView":"false",  /* (proposed also to include in index table or not) */
 "validations": ""
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants