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
/**
* 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;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
/**
* Class AuthServiceProvider
*
* @package FireflyIII\Providers
*/
class AuthServiceProvider extends ServiceProvider
{
/**
@@ -27,8 +12,7 @@ class AuthServiceProvider extends ServiceProvider
*
* @var array
*/
protected $policies
= [
protected $policies = [
'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy',
];

View File

@@ -1,25 +1,10 @@
<?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;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
/**
* Class BroadcastServiceProvider
*
* @package FireflyIII\Providers
*/
class BroadcastServiceProvider extends ServiceProvider
{
/**
@@ -31,13 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
{
Broadcast::routes();
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel(
'App.User.*', function ($user, $userId) {
return (int)$user->id === (int)$userId;
}
);
require base_path('routes/channels.php');
}
}