title: Laravel 5.1 - How to use Model in Global function file
body: <p>I created a <code>common.php</code> for my all the global function. When I run my first function {{Common::test()}} </p>
  
  <p>It's working fine But I can not use model in it.</p>
  
  <pre><code>namespace App\library;
  {
      class Common {
  
              public static function test()
              {
                  echo "Yes";
                  return "This comes from Common File";
              }
              public static function getCmsBlocks()
              {
                  $model = Modelname::all();
                  if($model){
                      echo "asdad";
                  }else
                  {
                      echo "sadasd";
                  }
              }
  
      }
  }
  </code></pre>
  
  <p>I don't get my output when I run {{Common::getCmsBlocks()}}</p>