/** * * @return type */ public static function getGalleries() { $array = array('0' => 'Válassz galériát!'); foreach (Gallery::all(['id', 'name']) as $gallery) { $array[$gallery->id] = $gallery->name; } return $array; }
/** * Display a listing of the resource. * GET /admin\gallery * * @return Response */ public function index() { View::share('title', 'Galériák'); $this->layout->content = View::make('admin.gallery.index')->with('galleries', Gallery::all(['id', 'name', 'created_at'])); }