<?php if (!empty($atts) && is_array($atts)) { $nb = 5; if (array_key_exists($atts, 'nb')) { if (is_numeric($atts['nb'])) { $nb = $atts['nb']; } } if (array_key_exists($atts, 'type')) { switch ($atts['type']) { case "post": $p = PostModel::all($nb); break; case "gallery": $p = GalleryModel::all($nb); break; case "product": $p = ProductModel::all($nb); break; default: $p = PostModel::all($nb); } } } ?> @include('partials.home.slider', [ 'post' => $p ])
public function loop() { Asset::add('masonry', 'js/masonry.pkgd.min.js', false, '1.0', false, 'script'); return View::make('partials.product.loop', ['posts' => PostModel::all()])->render(); }
public function index() { return View::make('home.home-content')->with(array('actus' => PostModel::all(), 'last_match' => MatchModel::getLastResult(10), 'next_match' => MatchModel::getNextMatchs(2), 'home_banner' => themosis_assets() . "/images/banner.jpg")); }