123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Admin\Actions\Community\Notice;
- use App\User;
- use Encore\Admin\Actions\BatchAction;
- use Illuminate\Database\Eloquent\Collection;
- class sendNotice extends BatchAction
- {
- public $name = '群发通知';
- public function handle(Collection $collection)
- {
- foreach ($collection as $model) {
- $openid = User::where('id',$model->id)->value('openid');
- if(empty($openid)) continue;
- }
- return $this->response()->success('Success message...')->refresh();
- }
- public function form()
- {
- $this->text('title','标题')->value('社区通州')->disable();
- $this->textarea('content','内容')->value('社区通州')->rows(4);
- $this->textarea('remark','备注')->value('社区通州')->rows(3);
- }
- }
|