Last active
November 7, 2019 03:24
-
-
Save mdmuzammalhoq/bf78dd9003c411c415b20e185e6a8db2 to your computer and use it in GitHub Desktop.
This file contains 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 artisan ti | |
factory(App\User::class, 200)->create() | |
*************************************************************** | |
$q = App\Question::first(); | |
$q->answers()->save(factory(App\Answer::class)->make()); | |
$a = App\Answer::find(1); | |
$a->votes_count = 7 | |
$a->save(); | |
******************************************************************** | |
$answer = App\Answer::find(8) | |
$answer = App\Answer::find(22) | |
$question = $answer->question | |
$question->best_answer_id = $answer->id | |
$question->save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment