public function delete($id) { $review = AlbumReview::findOrFail($id); File::delete(public_path() . '/img/albums/' . $review->img_name); AlbumReview::destroy($id); return redirect()->route('admin.reviews.index')->with('success', 'Album Review Deleted!'); }
/** * Bind data to the view. * * @param View $view * @return void */ public function compose(View $view) { $albums = AlbumReview::orderBy('id', 'desc')->take(2)->get(); $view->with('albums', $albums); }