leaveRepository = $leaveRepository; } /** * Display a listing of the resource. */ public function index() { $data['leaves'] = $this->leaveRepository->findAll(); return view('leave::index'); } /** * Show the form for creating a new resource. */ public function create() { $data['title'] = 'Create Leave'; return view('leave::create', $data); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { dd($request->all()); } /** * Show the specified resource. */ public function show($id) { return view('leave::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { return view('leave::edit'); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { // } /** * Remove the specified resource from storage. */ public function destroy($id) { // } }