Skip to content

Commit fffdaaa

Browse files
committed
remove old backpoack support and update to backpack_auth helper
1 parent 91edd6f commit fffdaaa

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
2121
### Security
2222
- Nothing
2323

24+
## 2.0.0 - 2019-07-11
25+
26+
### Added
27+
- config option to switch transformer
28+
- compatibility with L5.8
29+
- use backpack_auth() in DocumentRequest
30+
31+
### Removed
32+
- default config value for middleware
33+
- dependency on webfactor/laravel-apicontroller
34+
- Support for backpack/crud prior 3.5
35+
36+
2437
## 1.0.5 - 2018-06-25
2538

2639
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"backpack/crud": "^3.3.0",
22+
"backpack/crud": "^3.5.0",
2323
"spatie/laravel-fractal": "^5.2",
2424
"spatie/laravel-translatable": "^2 || ^3 || ^4"
2525
},

src/Requests/DocumentRequest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace Webfactor\Laravel\Backpack\Documents\Requests;
44

55
use App\Http\Requests\Request;
6+
use Illuminate\Foundation\Http\FormRequest;
67
use Illuminate\Validation\Rule;
78

8-
class DocumentRequest extends \Backpack\CRUD\app\Http\Requests\CrudRequest
9+
class DocumentRequest extends FormRequest
910
{
1011
/**
1112
* Determine if the user is authorized to make this request.
@@ -15,7 +16,7 @@ class DocumentRequest extends \Backpack\CRUD\app\Http\Requests\CrudRequest
1516
public function authorize()
1617
{
1718
// only allow updates if the user is logged in
18-
return \Auth::check();
19+
return backpack_auth()->check();
1920
}
2021

2122
/**

src/Requests/DocumentUpdateRequest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace Webfactor\Laravel\Backpack\Documents\Requests;
44

55
use App\Http\Requests\Request;
6+
use Illuminate\Foundation\Http\FormRequest;
67
use Illuminate\Validation\Rule;
78

8-
class DocumentUpdateRequest extends \Backpack\CRUD\app\Http\Requests\CrudRequest
9+
class DocumentUpdateRequest extends FormRequest
910
{
1011
/**
1112
* Determine if the user is authorized to make this request.
@@ -15,7 +16,7 @@ class DocumentUpdateRequest extends \Backpack\CRUD\app\Http\Requests\CrudRequest
1516
public function authorize()
1617
{
1718
// only allow updates if the user is logged in
18-
return \Auth::check();
19+
return backpack_auth()->check();
1920
}
2021

2122
/**

0 commit comments

Comments
 (0)