12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Distributor\Repositories;
- use App\Models\SmmPost as Model;
- use Dcat\Admin\Repositories\EloquentRepository;
- class SmmPost extends EloquentRepository
- {
- /**
- * Model.
- *
- * @var string
- */
- protected $eloquentClass = Model::class;
- /*
- * 插入数据
- */
- public static function create($post,$sendTime,$imageVideoUrl)
- {
- $model = new Model();
- $model->send_type = $post['send_type'];
- $model->send_time = $sendTime;
- $model->message = $post['message'];
- $model->media_type = $post['media_type'];
- $model->account_ids = implode(',',$post['account_ids']);
- $model->image_video_url = $imageVideoUrl;
- $model->status = 0;
- $model->save();
- return $model->id;
- }
- }
|