/** * Display a listing of the resource. * * @return Response */ public function home() { $services = Service::orderBy('created_at', 'DESC')->take(6)->get(); $materials = Material::orderBy('created_at', 'DESC')->take(6)->get(); return view('home')->with('services', $services)->with('materials', $materials)->with('title', trans('titles.home')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $materials = Material::orderBy('code')->get(); return view('material.index', compact('materials')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $materials = Material::orderBy('created_at', 'DESC')->paginate(9); return view('materials.index')->with('materials', $materials)->with('title', trans('titles.materials')); }