示例#1
0
 public function store(Specialty $specialty, validationRequest $request)
 {
     $input = $request->all();
     $specialty->fill($input)->save();
     $message = 'تمت الاضافة بنجاح';
     return redirect()->route('as.specialties.index')->with('success', trans('academystructure::specialties.create_success'));
 }
示例#2
0
 /**
  * [store description]
  * @param  Faculty           $faculty [description]
  * @param  validationRequest $request [description]
  * @return [type]                     [description]
  */
 public function store(validationRequest $request)
 {
     $input = $request->all();
     $faculty = new Faculty();
     $faculty->fill($input);
     $faculty->active = $request->has('active');
     if ($faculty->save()) {
         if ($faculty->active) {
             Faculty::where('id', '!=', $faculty->id)->update(['active' => 0]);
         }
     }
     return redirect()->route('as.faculties.index')->with('success', trans('academystructure::faculties.create_success'));
 }
示例#3
0
 public function store(Faculty $faculty, validationRequest $request)
 {
     $input = $request->all();
     $faculty->fill($input)->save();
     return redirect()->route('as.faculties.index')->with('success', trans('academystructure::faculties.create_success'));
 }