Created
March 8, 2017 10:59
-
-
Save raank/9e6a1ae779ec154755701944223c62f9 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
<?php | |
// create user | |
$user = new \App\User(); | |
$user->name = 'teste'; | |
$user->email = '[email protected]'; | |
$user->password = bcrypt('teste'); | |
$user->save(); | |
// create voter for user | |
$voter = new \App\Voter(); | |
$voter->user_id = $user->id; | |
$voter->nickname = 'teste'; | |
$voter->genre = 1; // 1 to masc or 0 to fem | |
$voter->birth = '2017-03-08'; | |
$voter->observations = 'teste'; | |
$voter->save(); | |
// create education for voter | |
$education = $voter->education()->create(['education' => 'Superior completo']); | |
dd( $education ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment