title: Create Instance variable in Laravel
body: <p>I have a php class which having 4 methods.All the 4 methods are using some common variables, I've created those variables as instance variable. But i'm getting an error like "Undefined variable: " How can i solve this problem.
  My code is,</p>
  
  <pre><code>public class test{
      public static $variable;
  
      public function func(){
        $variable = "Hello World";
        print_r($variable);
      }
  
  }
  </code></pre>