master
cody 6 months ago
parent 2135276650
commit 6feebe9627

@ -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();

@ -0,0 +1,48 @@
<?php
/**
* 缴费通知
*/
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class SupplyDemand extends Notification
{
use Queueable;
public $data;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($data)
{
$this->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;
}
}
Loading…
Cancel
Save