user()->hasRole('employee')) { $query->where("createdby", auth()->user()->id); } }) ->where('status', 12) ->whereDate('release_date', '>=', now()) ->get(); } public function getContentById($ContentId) { return Content::findOrFail($ContentId); } public function getContentByEmail($email) { return Content::where('email', $email)->first(); } public function delete($ContentId) { Content::destroy($ContentId); } public function create($ContentDetails) { return Content::create($ContentDetails); } public function update($ContentId, array $newDetails) { return Content::whereId($ContentId)->update($newDetails); } public function pluck() { return Content::pluck('title', 'id'); } public function count() { return Content::count(); } }