json(NotificacaoService::index(), Response::HTTP_OK); } public function create() { $this->auth(__FUNCTION__); return response()->json(NotificacaoService::create(), Response::HTTP_OK); } public function store(Request $request) { $this->auth(__FUNCTION__); return response()->json(NotificacaoService::store($request), Response::HTTP_CREATED); } public function edit($id) { $this->auth(__FUNCTION__); return response()->json(NotificacaoService::edit($id), Response::HTTP_OK); } public function update(Request $request, $id) { $this->auth(__FUNCTION__); return response()->json(NotificacaoService::update($request, $id), Response::HTTP_OK); } public function destroy($id) { $this->auth(__FUNCTION__); return response()->json(NotificacaoService::destroy($id), Response::HTTP_NO_CONTENT); } public function datatable() { return datatables() ->of(NotificacaoService::datatable()) ->filterColumn('administracao_notificacao.updated_at', function ($query, $keyword) { $query->whereRaw("DATE_FORMAT(administracao_notificacao.updated_at, '%d/%m/%Y %H:%i') like ?", ["%{$keyword}%"]); }) ->make(true); } public function list() { return response()->json(NotificacaoService::list(), Response::HTTP_OK); } }