public function getIndex() { $pieces = Piece::orderBy('title', 'asc')->paginate(20); return view('gallery.index', compact('pieces')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $pieces = Piece::orderBy('title', 'asc')->get(); return view('admin.pieces.index', compact('pieces')); }