コード例 #1
0
 /**
  * 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'));
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $materials = Material::orderBy('code')->get();
     return view('material.index', compact('materials'));
 }
コード例 #3
0
 /**
  * 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'));
 }