Created
March 31, 2014 18:18
-
-
Save mattaebersold/9898718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Homepage feed | |
public function index($filter = null) { | |
// Tell Laravel where to find the mustache views for post | |
app('view')->addNamespace('js', public_path().'/js'); | |
// Render the view | |
$this->layout->nest('content', 'gadget.index', array( | |
'posts' => Post::filter($filter)->ordered()->visible()->take(self::PER_PAGE)->where('type', '=', 'youtube')->get(), | |
'filters' => Filter::ordered()->get(), | |
'featured' => Post::query()->orderBy(DB::raw('RAND()'))->visible()->take(1)->where('type', '=', 'youtube')->get(), | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment