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')); }
/** * [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')); }
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')); }