芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/app/Repositories/Admin/SubscribeRepository.php
model = $subscriber; } /** * Get subscribers */ public function paginateSearchResult($search, array $sort = []): LengthAwarePaginator { $query = $this->model->newQuery(); if ($search) { $query->orWhere('email', 'like', "%$search%"); } $query->orderBy($sort['column'], $sort['order']); return $query->paginate(30) ->appends(array_filter([ 'search' => $search, 'sort' => $sort, ])); } /** * Store subscribe */ public function subscribe(Request $request): void { $this->model->create([ 'email' => $request->email, ]); } /** * Delete subscriber */ public function destroy(Subscriber $subscriber): void { $subscriber->delete(); } /** * Bulk delete */ public function bulkDelete(Request $request): void { $ids = explode(',', $request->ids); $this->model->whereIn('id', $ids)->delete(); } }