title: Laravel 4 magic method __call replacement in controllers
body: <p>I am building a permission system and I need to have granularity over every method of every controller, so i was thinking to implment this with the __call magic method on my base controller like so:</p>
  
  <pre><code>public function __call($name, $args)
  {       
      if ( $this-&gt;checkPermission() )
      {
  
          call_user_func_array(array($this, $name), $args);
      }
      else 
      {
          // handle error
      }
  
  }
  </code></pre>
  
  <p>But apparantly this does not work in Laravel 4. How would be right approach to emulate that __call magic method ? I thought of before filters but they are not handed the called method name and arguments</p>