Laravel 5.1 Call to undefined method Illuminate\Auth\Access\Gate::allow()
<p>When I've implemented this (<a href="https://mattstauffer.co/blog/acl-access-control-list-authorization-in-laravel-5-1" rel="nofollow">https://mattstauffer.co/blog/acl-access-control-list-authorization-in-laravel-5-1</a>) 
authorization laravel 5.1 tutorial, I've found the usage of this </p>

<pre><code>if (Gate::allows('create-contact')) {
    redirect('hooray');
}
</code></pre>

<p>And then the framework shows me this error</p>

<pre><code>Call to undefined method Illuminate\Auth\Access\Gate::allow()
</code></pre>

<p>Everything is OK with the dependencies, so that's not the problem, then I found that laravel started to implement this method since version 5.1.11
in this topic at laravel's docs for authorization (laraveldocs/5.1/authorization)
So laravel team is saying in their documentation page that this authorization feature is available since version 5.1.11.</p>

<p>I was getting the same error, so I went to the laravel/framework repository on github (github/laravel/framework/)
and check from version 5.1.11 to 5.1.31 and found that method doesn't exist in the source code.</p>

<p>That gate method is available since version 5.2</p>

<p>You can check both of them here  for v5.1 (github/laravel/framework/blob/v5.1.31/src/Illuminate/Contracts/Auth/Access/Gate.php) and for v5.2 (github/laravel/framework/blob/v5.2.0/src/Illuminate/Contracts/Auth/Access/Gate.php)</p>

<p>So I wanted to share this knowledge with you, but if you find a solution, without upgrading the version of the framework, I would be glad to know.</p>

<p>Thanks!</p>