title: How to declare global variable and initialization
body: <p>how can i declare a global variable and initialize it? . </p>
  
  <p>I have this situation, i am using NEXMO SMS APP in laravel and I have a global variable and I initialize it in my constructor, then i use the global variable in my public functions. After using it in my public functions, it says undefined variable. Why? . Please bare to help me, i am just a beginner.</p>
  
  <p>Here is my code:</p>
  
  <pre><code> class CheckVerify extends Controller {
           private $client;
           public function __construct() {
              $client = app('Nexmo\Client');    
          }
  
          public function mobile_verification($number) {                        
  
          $verification = $client-&gt;verify()-&gt;start([
              'number' =&gt; $number,
              'brand'  =&gt; 'Mysite'
          ]);
          }
  
          public function check_verify($code) {        
              $client-&gt;verify()-&gt;check($verification, $code);
          }
      }
  </code></pre>