public function update($slug, Request $request) { //$song = new Songs(); //$song->fill(['lyrics'=>$request->get('lyrics')])->save(); //new entry Songs::where('slug', $slug)->update(['lyrics' => $request->get('lyrics')]); return redirect('songs/' . $slug); }
public function edit($slug) { $song = Songs::whereSlug($slug)->first(); return view('pages.edit', compact('song')); }
public function search() { $title = Input::get('character'); $searchResult = Songs::where('title', 'LIKE', '%' . $title . '%')->get(); return view('show.search', compact('searchResult'))->with('title', $title)->with('searchResult', $searchResult); }