fieldRepository = $fieldRepository; $this->dropdownRepository = $dropdownRepository; } /** * Display a listing of the resource. */ public function index() { return view('admin::index'); } /** * Show the form for creating a new resource. */ public function create() { return view('admin::create'); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { $inputData = $request->all(); try { $this->fieldRepository->create($inputData); toastr()->success('Field Created Succesfully'); } catch (\Throwable $th) { toastr()->error($th->getMessage()); } return redirect()->route('dropdown.index'); } /** * Show the specified resource. */ public function show($id) { return view('admin::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { return view('admin::edit'); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { // } /** * Remove the specified resource from storage. */ public function destroy($id) { // } }