?> /> <br /> <?php } ?> <label for="title">Titulo</label> <input type="text" id="title" name="title" <?php echo "value='{$album->Title}'"; ?> /> <br /> <label for="artist">Artista</label> <select id="artist" name="artist"> <?php foreach (Artist::all(10000) as $artist) { ?> <option <?php echo "value='{$artist->ArtistId}'"; ?> <?php echo isset($album->AlbumId) && $artist->ArtistId == $album->Artist->ArtistId ? " selected " : ""; ?> ><?php echo $artist->Name; ?> </option> <?php } ?> </select>
public function getArtists() { $artists = Artist::all(); return View::make('artist')->with('artists', $artists)->with('page_title', 'Artists and Partners'); }