PHPackages                             junaid-ahmad-khan/laravel-extended-resource-authorization - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. junaid-ahmad-khan/laravel-extended-resource-authorization

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

junaid-ahmad-khan/laravel-extended-resource-authorization
=========================================================

Extended Resource Authorization

1.7(5y ago)061[1 PRs](https://github.com/junaid-A-khan/laravel-extended-resource-authorization/pulls)MITPHP

Since Jul 8Pushed 5y agoCompare

[ Source](https://github.com/junaid-A-khan/laravel-extended-resource-authorization)[ Packagist](https://packagist.org/packages/junaid-ahmad-khan/laravel-extended-resource-authorization)[ Docs](https://github.com/junaid-A-khan/laravel-extended-resource-authorization)[ RSS](/packages/junaid-ahmad-khan-laravel-extended-resource-authorization/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (10)Used By (0)

### Installation PHP &gt;=7.4

[](#installation-php-74)

```
composer require junaid-ahmad-khan/laravel-extended-resource-authorization

```

---

### Installation PHP &lt;7.3

[](#installation-php-73)

```
composer require junaid-ahmad-khan/laravel-extended-resource-authorization:1.5

```

---

### Description

[](#description)

This package provides an easy way to authorize custom methods when using

```
class UserController extends Controller{

    public function __construct(){
        $this->authorizeResource(User::class,'user');
    }
}

```

which only works for default resource routes show, create, edit, store, update and destroy

### Simple Usage

[](#simple-usage)

#### Step 1:

[](#step-1)

First you will need to remove AuthorizesRequests trait and add/use ExtendedAuthorizesRequest trait in your app/Http/Controllers/Controller.php

```
