Skip to content

Commit de30bfc

Browse files
committed
Improve code. Add base Controller
1 parent 5b61de3 commit de30bfc

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Version **2.x** is for laravel **6** or **7**. You can use branch `laravel67-rba
3636

3737
Run the composer command:
3838

39-
`composer require itstructure/laravel-rbac "~3.0.8"`
39+
`composer require itstructure/laravel-rbac "~3.0.9"`
4040

4141
### 3.2 App config
4242

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### CHANGE LOG:
22

3+
**3.0.9 March 24, 2023:**
4+
- Improve code. Add base Controller.
5+
36
**3.0.8 February 18, 2023:**
47
- Add support for Laravel 10.
58

src/Http/Controllers/Controller.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Itstructure\LaRbac\Http\Controllers;
4+
5+
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6+
use Illuminate\Foundation\Validation\ValidatesRequests;
7+
use Illuminate\Routing\Controller as BaseController;
8+
9+
class Controller extends BaseController
10+
{
11+
use AuthorizesRequests, ValidatesRequests;
12+
}

src/Http/Controllers/PermissionController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Delete as DeletePermissionRequest
1010
};
1111
use Itstructure\GridView\DataProviders\EloquentDataProvider;
12-
use App\Http\Controllers\Controller;
1312

1413
/**
1514
* Class PermissionController

src/Http/Controllers/RoleController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Delete as DeleteRoleRequest
1010
};
1111
use Itstructure\GridView\DataProviders\EloquentDataProvider;
12-
use App\Http\Controllers\Controller;
1312

1413
/**
1514
* Class RoleController

src/Http/Controllers/UserController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Delete as DeleteUserRequest
1111
};
1212
use Itstructure\GridView\DataProviders\EloquentDataProvider;
13-
use App\Http\Controllers\Controller;
1413

1514
/**
1615
* Class UserController

0 commit comments

Comments
 (0)