php - Class 'App\Libs\Emotes' not found (Laravel & Blade) -


i'm having issue laravel (5), been long time since haven't touched laravel since versions of 4, , laravel 5 released boarded train , thought have go it, emote phraser.

basically over-all issue i'm having class "app\libs\emote not found" although think i've registered alias correctly us, prove me wrong.

<!doctype html> <html>     <head>         <title>laravel</title>          <link href="//fonts.googleapis.com/css?family=lato:100" rel="stylesheet" type="text/css">          <style>             html, body {                 height: 100%;             }              body {                 margin: 0;                 padding: 0;                 width: 100%;                 display: table;                 font-weight: 100;                 font-family: 'lato';             }              .container {                 text-align: center;                 display: table-cell;                 vertical-align: middle;             }              .content {                 text-align: center;                 display: inline-block;             }              .title {                 font-size: 96px;             }         </style>     </head>     <body>         <div class="container">             {{                 emote::phraseemote()             }}             <div class="content">                 <div class="title">(flag:gb) (flag:us)</div>             </div>         </div>     </body> </html>   class;  <?php namespace libs\emotes;  class emotes {      public static function phraseemote($value) {         $config = config::get('emotes');          $smileys = $config['render_phrase'];          foreach($emotes $key => $val) {             //$value = str_replace($key, '<img src="' . $config['path'] . $smileys[$key][0] . '" width="' . $smileys[$key][1] . '" height="' . $smileys[$key][2] . '" alt="' . $smileys[$key][3] . '" style="border:0;" />', $value);             $value = str_replace($key, $emotes[$key][0], $value);         }          return $value;     } } ?>  config;  <?php return array(     'render_phrase'    => array(         '(flag:gb)' => array('<i class="gb flag" data-content="united kingdom" data-variation="tiny"></i>'),         '(flag:us)' => array('<i class="us flag" data-content="united states" data-variation="tiny"></i>'),         //'(flag:cn_code)' => array('<i class="cn_code flag" data-content="united states" data-variation="tiny"></i>'),     ) ); 

after seeing folder structure think might help.

the name space base directory (path) of class. so

namespace app\libs\emotelib

since class not extend class go now.

hope helped.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -