private function composeDonations() { view()->composer('layout', function ($view) { $view->with('donation', Donate::first()); }); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit() { $donate = Donate::first(); return view('admin.donate.edit', compact('donate', $donate)); }