Installing Package in Laravel VIA Composer -


i using laravel 4 project, download package turns youtube/vimeo urls embed, required package in composer , run composer update.

however trying use package keep getting error:

class 'embed' not found  

the code in helpers.php file:

function embed_video($url, $width = 0, $height = 0) {     $embed = embed::make($url)->parseurl();      if ($embed) {         // set width of embed.         if ($width > 0)         {             $embed->setattribute(['width' => $width]);         }          // set height of embed.         if ($height > 0)         {             $embed->setattribute(['height' => $height]);         }          return $embed->gethtml();     }  } 

i call function in view.
link package: cohensive


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -