I am trying to print out the album information for a certain artist and album using the last.fm api. I have used dump-autoload for the api library (so the classes should be available). In one of my controllers, LastFMController.php, I have the following:
public function some_function() {
$authVars['apiKey'] = '************************';
$auth = new lastfmApiAuth('setsession', $authVars);
$artistName= "Coldplay";
$albumName = "Mylo Xyloto";
$album = Album::getInfo($artistName, $albumName);
echo '<div>';
echo 'Number of Plays: ' . $album->getPlayCount() . ' time(s)<br>';
echo 'Cover: <img src="' . $album->getImage(4) . '"><br>';
echo 'Album URL: ' . $album->getUrl() . '<br>';
echo '</div>';
}
I have a route that runs this code. When I run this, I get the following error:
Class 'Album' not found
Any idea what I'm doing wrong? Thank you.