title: can't calling a class methods in laravel controller class
body: <p>Suppose I have this code:</p>
  
  <pre><code>class UserController extends Controller
  {
      protected $test;
  
      public function __construct()
      {
          $this-&gt;test = new Test();
  
      }
  
      // first call this func
      public function add_name()
      {
          $this-&gt;test-&gt;add_name('name1')
          return $this-&gt;test-&gt;get_name();
      }
  
      // then this one
      public function show_name()
      {
          return $this-&gt;test-&gt;get_name();
      }
  
  }
  
  class Test
  {
      protected  $name;
  
      public function get_name()
      {
          return $this-&gt;name;
      }
  
      public function add_name($name)
      {
          $this-&gt;name = $name;
      }
  }
  </code></pre>
  
  <p>So when I call show_name() function after add_name() in <code>UserController</code>(first class), return nothing. What is my code problem?
  (when calling add_name() function it work correctly)</p>