コード例 #1
0
 public function update(Request $request)
 {
     $job = JobOpening::find($request->id);
     $job->title = $request->get('title');
     $job->is_available = intval($request->get('is_available'));
     $job->save();
 }
コード例 #2
0
 public function showTable()
 {
     /*
      * showtable view requires: db entries to show,
      *                        the columns to show,
      *                        the titles to display for those columns,
      *                        a list of columns that are foreign keys,
      *                        the set of ids and the values to display for each foreign key,
      *                        and a title for the table.
      */
     return View::make('showtable', ['entries' => Applicant::all(), 'cols' => ['name', 'email', 'phone', 'github_id', 'position_id', 'invitation_date', 'submission_date'], 'colTitles' => ['Name', 'Email', 'Phone', 'GitHub', 'Position', 'Invited', 'Submitted'], 'foreignKeys' => ['position_id'], 'foreignKeyToIdToValue' => ['position_id' => JobOpening::lists('title', 'id')->all()], 'name' => 'applicants', 'title' => 'Applicants']);
 }