Closed seeya closed 7 years ago
I'm referring to the Query documentation.
Query
The function $post = Post::where($data)->firstOrCreate();
$post = Post::where($data)->firstOrCreate();
should be written as $post = Post::firstOrCreate($data);
$post = Post::firstOrCreate($data);
to prevent any errors.
You're right! I'll push the change soon. Thanks~
I'm referring to the
Query
documentation.The function
$post = Post::where($data)->firstOrCreate();
should be written as
$post = Post::firstOrCreate($data);
to prevent any errors.