示例#1
0
 /**
  * Delete the job title.
  *
  * @Delete("ajax/delete-job-title")
  *
  * @param JobTitleRequest $request
  * @author Bertrand Kintanar
  */
 public function deleteJobTitle(JobTitleRequest $request)
 {
     if ($request->ajax()) {
         $jobTitleId = $request->get('id');
         try {
             JobTitle::whereId($jobTitleId)->delete();
             print 'success';
         } catch (Exception $e) {
             print 'failed';
         }
     }
 }