diff --git a/app/Http/Controllers/Mobile/SupplyDemandController.php b/app/Http/Controllers/Mobile/SupplyDemandController.php index e52269a..38bcab3 100755 --- a/app/Http/Controllers/Mobile/SupplyDemandController.php +++ b/app/Http/Controllers/Mobile/SupplyDemandController.php @@ -103,7 +103,7 @@ class SupplyDemandController extends CommonController * description="", * @OA\Parameter(name="id", in="query", @OA\Schema(type="integer"), required=false, description="需求供应表ID(存在则更新,不存在则新增)"), * @OA\Parameter(name="title", in="query", @OA\Schema(type="string"), required=false, description="标题"), - * @OA\Parameter(name="supply_demand_type_id", in="query", @OA\Schema(type="integer"), required=false, description="分类ID"), + * @OA\Parameter(name="type", in="query", @OA\Schema(type="integer"), required=false, description="分类1供应2需求"), * @OA\Parameter(name="content", in="query", @OA\Schema(type="string"), required=false, description="内容"), * @OA\Parameter(name="tag", in="query", @OA\Schema(type="string"), required=false, description="标签"), * @OA\Parameter(name="wechat", in="query", @OA\Schema(type="string"), required=false, description="微信号"), @@ -130,6 +130,7 @@ class SupplyDemandController extends CommonController } else { $model = new SupplyDemand(); $all['user_id'] = $this->getUserId(); + // 发通知 } $model->fill($all); $model->save(); diff --git a/app/Notifications/SupplyDemand.php b/app/Notifications/SupplyDemand.php new file mode 100755 index 0000000..f8c3db6 --- /dev/null +++ b/app/Notifications/SupplyDemand.php @@ -0,0 +1,48 @@ +data = $data; + } + + /** + * Get the notification's delivery channels. + * + * @param mixed $notifiable + * @return array + */ + public function via($notifiable) + { + return ['database']; + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return $this->data; + } +}