public static function sandbox() { $first = Recipe::find(1); $recipes = Recipe::all(); Kint::dump($recipes); Kint::dump($first); }
public static function sandbox() { // Testaa koodiasi täällä // View::make('helloworld.html'); $indi = Recipe::find(1); $indis = Recipe::all(); Kint::dump($indi); Kint::dump($indis); }
/** * Display a listing of the resource. * * @return Response */ public function listall() { // $recipes = Recipe::all(); return Response::json($recipes); }
/** * @param $params * @param $pages * @param $page_size */ protected static function make_paged_index($params, $pages, $page_size) { $page = $params['page']; if ($page <= 0 || $page > $pages) { Redirect::to('/', array('error' => 'Sivua ei ole olemassa')); } else { $recipes = Recipe::all(array('page' => $page, 'page_size' => $page_size)); $content = self::make_paged_content($pages, $recipes, $page); View::make('recipe/index.html', $content); } }