Separated providers.

This commit is contained in:
James Cole
2017-09-09 22:06:13 +02:00
parent 8823666aa9
commit f077adaefd
2 changed files with 6 additions and 44 deletions

View File

@@ -1,25 +1,10 @@
<?php <?php
/**
* AuthServiceProvider.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
namespace FireflyIII\Providers; namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
/**
* Class AuthServiceProvider
*
* @package FireflyIII\Providers
*/
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider
{ {
/** /**
@@ -27,10 +12,9 @@ class AuthServiceProvider extends ServiceProvider
* *
* @var array * @var array
*/ */
protected $policies protected $policies = [
= [ 'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy',
'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy', ];
];
/** /**
* Register any authentication / authorization services. * Register any authentication / authorization services.

View File

@@ -1,25 +1,10 @@
<?php <?php
/**
* BroadcastServiceProvider.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
namespace FireflyIII\Providers; namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
/**
* Class BroadcastServiceProvider
*
* @package FireflyIII\Providers
*/
class BroadcastServiceProvider extends ServiceProvider class BroadcastServiceProvider extends ServiceProvider
{ {
/** /**
@@ -31,13 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
{ {
Broadcast::routes(); Broadcast::routes();
/* require base_path('routes/channels.php');
* Authenticate the user's personal channel...
*/
Broadcast::channel(
'App.User.*', function ($user, $userId) {
return (int)$user->id === (int)$userId;
}
);
} }
} }