title: Laravel Gate custom response
body: <p>I have laravel 5.5 application and i use gates to authorise users. When the authorisation fails, the response is <code>This action is unauthorized</code> How can i overwrite this response? I want to offer users a custom response. </p>
  
  <p>The way i implemented it is by defining  gates in AuthServiceProvider class and then using these gates with the middleware in my routes. In later laravel versions there is something like:</p>
  
  <pre><code>Gate::define('edit-settings', function ($user) {
      return $user-&gt;isAdmin
                  ? Response::allow()
                  : Response::deny('You must be a super administrator.');
  });
  </code></pre>
  
  <p>But allow and deny methods don't exist in Laravel 5.5</p>