Skip to content

Commit ebf3817

Browse files
committed
Updates to make it work with Laravel 5.3
1 parent af300c4 commit ebf3817

File tree

8 files changed

+59
-14
lines changed

8 files changed

+59
-14
lines changed

.env.testing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
EMAIL_DRIVER=log
2+
APP_KEY=base64:Ctm7ecWQR5tquhaoNy0aZ1z9fRXRsCWXeRwGfDA3li0=
23

34
# database
45
DB_DEFAULT=sqlite

app/Authentication/Repository/UserRepositorySearchFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function all(array $input_filter = [])
3939

4040
$q = $this->createAllSelect($q);
4141

42-
$users = $q->get();
42+
$users = $q->get()->all();
4343

4444
$user_emails = array_flip(array_map((function ($element)
4545
{
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace LaravelAcl\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
use Illuminate\Support\Facades\Broadcast;
7+
8+
class BroadcastServiceProvider extends ServiceProvider
9+
{
10+
/**
11+
* Bootstrap any application services.
12+
*
13+
* @return void
14+
*/
15+
public function boot()
16+
{
17+
Broadcast::routes();
18+
19+
/*
20+
* Authenticate the user's personal channel...
21+
*/
22+
Broadcast::channel('App.User.*', function ($user, $userId) {
23+
return (int) $user->id === (int) $userId;
24+
});
25+
}
26+
}

app/Providers/EventServiceProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ class EventServiceProvider extends ServiceProvider
2424
* @param \Illuminate\Contracts\Events\Dispatcher $events
2525
* @return void
2626
*/
27-
public function boot(DispatcherContract $events)
27+
public function boot()
2828
{
29-
parent::boot($events);
30-
31-
//
29+
parent::boot();
3230
}
3331
}

app/Providers/RouteServiceProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ class RouteServiceProvider extends ServiceProvider
2222
* @param \Illuminate\Routing\Router $router
2323
* @return void
2424
*/
25-
public function boot(Router $router)
25+
public function boot()
2626
{
27-
//
28-
29-
parent::boot($router);
27+
parent::boot();
3028
}
3129

3230
/**

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"license": "MIT",
2020
"type": "project",
2121
"require": {
22-
"laravel/framework": "5.2.*",
23-
"laravelcollective/html" : "5.2.*",
22+
"laravel/framework": "5.3.*",
23+
"laravelcollective/html" : "5.3.*",
2424
"intervention/image": "2.*",
25-
"jacopo/authentication-sentry": "3.0.*",
25+
"jacopo/authentication-sentry": "dev-master",
2626
"gregwar/captcha": "1.0.11"
2727
},
2828
"require-dev": {

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
'key' => env('APP_KEY', 'SomeRandomString'),
8282

83-
'cipher' => MCRYPT_RIJNDAEL_128,
83+
'cipher' => 'AES-256-CBC',
8484

8585
/*
8686
|--------------------------------------------------------------------------

docs/index.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ a simple admin panel with an ACL using Laravel framework.
1919

2020
To install this software you need:
2121

22-
* Laravel framework 5.2+
22+
* Laravel framework 5.3+
2323
* Php>=5.5.9
2424
* GD Library or Imagick
2525
* Enable Fileinfo extension(may be needed for windows users) <a href="http://php.net/manual/en/fileinfo.installation.php">how to enable it</a>
@@ -31,12 +31,34 @@ To install authentication follow this steps:
3131
1. Create an empty <a href="http://laravel.com/docs/quick" target="_blank">Laravel 5</a> installation if you don't have any.
3232

3333
2. Add to your _composer.json_ require field the following lines:
34+
35+
__For Laravel version 5.3:__
36+
3437
```
3538
"require": {
3639
...
3740
"jacopo/laravel-authentication-acl": "1.3.*"
3841
},
3942
```
43+
44+
__For Laravel version 5.2:__
45+
46+
```
47+
"require": {
48+
...
49+
"jacopo/laravel-authentication-acl": "1.3.15"
50+
},
51+
```
52+
53+
__For Laravel version 5.1 or 5.0:__
54+
55+
```
56+
"require": {
57+
...
58+
"jacopo/laravel-authentication-acl": "1.3.11"
59+
},
60+
```
61+
4062
4163
3. Now run `composer install` command.
4264

0 commit comments

Comments
 (0)