コード例 #1
0
 /**
  * Remove the resume.
  *
  * @param Request $request
  * @param Model   $resume
  *
  * @return json
  */
 public function destroy(ResumeUserApiRequest $request, Resume $resume)
 {
     try {
         $t = $resume->delete();
         return response()->json(['message' => trans('messages.success.delete', ['Module' => trans('career::resume.name')]), 'code' => 2006])->setStatusCode(202, 'DESTROY_SUCCESS');
     } catch (Exception $e) {
         return response()->json(['message' => $e->getMessage(), 'code' => 4006])->setStatusCode(400, 'DESTROY_ERROR');
     }
 }
コード例 #2
0
 /**
  * Remove the specified resource.
  *
  * @param int $id
  *
  * @return Response
  */
 public function destroy(ResumeUserRequest $request, Resume $resume)
 {
     try {
         $this->repository->delete($resume->getRouteKey());
         return redirect(trans_url('/user/career/resume'))->with('message', trans('messages.success.deleted', ['Module' => trans('career::resume.name')]))->with('code', 204);
     } catch (Exception $e) {
         redirect()->back()->withInput()->with('message', $e->getMessage())->with('code', 400);
     }
 }
コード例 #3
0
 public function transform(\Litecms\Career\Models\Resume $resume)
 {
     return ['id' => $resume->getRouteKey(), 'name' => ucfirst($resume->name), 'email_id' => $resume->email_id, 'mobile' => $resume->mobile, 'message' => ucfirst($resume->message), 'resume' => $resume->resume, 'image' => $resume->image, 'job_id' => $resume->jobs['title']];
 }