|
@@ -15,6 +15,7 @@ use App\Models\PostData;
|
|
|
use App\Models\PostImgs;
|
|
|
use App\Models\PostLog;
|
|
|
use App\Models\Topic;
|
|
|
+use App\Traits\PostTrait;
|
|
|
use Illuminate\Database\QueryException;
|
|
|
use Dingo\Api\Http\Response;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
@@ -25,6 +26,7 @@ use Tymon\JWTAuth\Facades\JWTAuth;
|
|
|
|
|
|
class PostRepository
|
|
|
{
|
|
|
+ use PostTrait;
|
|
|
|
|
|
public function __construct(Post $post,
|
|
|
PostData $postData,
|
|
@@ -97,8 +99,8 @@ class PostRepository
|
|
|
'comment_real_count' => 0,
|
|
|
'collect_count' => 0,
|
|
|
'collect_real_count' => 0,
|
|
|
- 'available_bean' => 0,
|
|
|
- 'will_collect_bean' => 0,
|
|
|
+ 'available_bean' => $this->availableBean(),
|
|
|
+ 'will_collect_bean' => rand(100, 200),
|
|
|
'collect_bean' => 0,
|
|
|
'weight' => 0
|
|
|
]);
|