Last active
August 29, 2015 13:59
-
-
Save terion-name/10640852 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#User scaffolding | |
php artisan generate:scaffold user --fields="email:string:nullable:unique, password:string:nullable, first_name:string:nullable, last_name:string:nullable, gender:string(16):nullable:default('male'), birthday:date:nullable" | |
#Social accounts | |
php artisan generate:migration create_socials_table --fields="user_id:integer:unsigned, soc_uid:string, provider:string(8), user_id:foreign:references('id'):on('users'):onDelete('cascade')" | |
php artisan generate:model Social | |
#Social wall posts | |
php artisan generate:migration create_social_posts_table --fields="user_id:integer:unsigned:nullable, post_id:string, provider:string(8):default('fb'), user_id:foreign:references('id'):on('users'):onDelete('set null')" | |
php artisan generate:model SocialPost | |
#Social invites | |
php artisan generate:migration create_social_invites_table --fields="user_id:integer:unsigned:nullable, invited_id:integer:unsigned:nullable, invite_id:string, provider:string(8):default('fb'), user_id:foreign:references('id'):on('users'):onDelete('set null'), invited_id:foreign:references('id'):on('users'):onDelete('set null')" | |
php artisan generate:model SocialInvite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment