Custom Facades in laravel 5.2
<blockquote>
  <p>Im a beginner in laravel 5.2 and i was trying to create a custom facades. For that, i have taken a references from the site which is given below</p>
</blockquote>

<p><a href="http://www.expertphp.in/article/how-to-create-custom-facade-in-laravel-52?utm_source=learninglaravel.net" rel="nofollow noreferrer">How to create custom facade in laravel 5.2</a></p>

<p>I have everything in that references but i got error while routing that class.
My route is:</p>

<pre><code>   Route::get('/avatar', function(){
    $img='&lt;img src="'.GeneralClass::getGravatarURL('raimausam32@gmail.com').'"&gt;';
    echo $img;   
});
</code></pre>

<p>But I got error</p>

<pre><code>FatalErrorException in routes.php line 15:
</code></pre>

<p>Class 'GeneralClass' not found</p>

<p>I have no single idea. So please someone help in this problem. It may be simple for others but i am stuck in this problem.</p>

<p>This is my application structure</p>

<p><a href="https://i.stack.imgur.com/J4eHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J4eHT.png" alt="enter image description here"></a></p>

<pre><code>     Facades/GeneralClass.php

   &lt;?php
    namespace App\Facades;
      use Illuminate\Support\Facades\Facade;

    class GeneralClass extends Facade{
    protected static function getFacadeAccessor() { return 'generalclass'; }
    }

      Helpers/GeneralClass.php
        &lt;?php
        namespace App\Helpers;
      class GeneralClass {

        public function getGravatarURL($email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array())
     {
    $url = 'http://www.gravatar.com/avatar/';
    $url .= md5(strtolower(trim($email)));
    $url .= "?s=$s&amp;d=$d&amp;r=$r";
    if ($img)
    {
        $url = '&lt;img src="' . $url . '"';
        foreach ($atts as $key =&gt; $val)
            $url .= ' ' . $key . '="' . $val . '"';
        $url .= ' /&gt;';
      }
     return $url;
     }
     }


    Providers/GeneralClassServiceProvider.php



      &lt;?php

    namespace App\Providers;

     use Illuminate\Support\ServiceProvider;

      class GeneralClassServiceProvider extends ServiceProvider
    {
/**
 * Bootstrap the application services.
 *
 * @return void
 */
 public function boot()
 {
    //
  }

/**
 * Register the application services.
 *
 * @return void
 */
 public function register()
 {
  App::bind('generalclass',function(){
    return new \App\Helpers\GeneralClass;
   });
   }
 }
</code></pre>

<p><a href="https://i.stack.imgur.com/eRWKm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eRWKm.png" alt="enter image description here"></a></p>