1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 12:42:36 +01:00
This commit is contained in:
Hillel Coren 2016-12-09 14:02:29 +02:00
parent 9a92f11657
commit 137c718199
4 changed files with 27 additions and 8 deletions

View File

@ -6,8 +6,7 @@
"active": 1,
"order": 0,
"providers": [
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\$STUDLY_NAME$ServiceProvider",
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\AuthProviders\\$STUDLY_NAME$AuthProvider"
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\$STUDLY_NAME$ServiceProvider"
],
"aliases":{},
"files": [

View File

@ -2,9 +2,9 @@
namespace $NAMESPACE$;
use Illuminate\Support\ServiceProvider;
use App\Providers\AuthServiceProvider;
class $CLASS$ extends ServiceProvider
class $CLASS$ extends AuthServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
@ -13,6 +13,15 @@ class $CLASS$ extends ServiceProvider
*/
protected $defer = false;
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
\Modules\$STUDLY_NAME$\Models\$STUDLY_NAME$::class => \Modules\$STUDLY_NAME$\Policies\$STUDLY_NAME$Policy::class,
];
/**
* Register the service provider.
*

View File

@ -2,9 +2,10 @@
namespace $NAMESPACE$;
use Illuminate\Support\ServiceProvider;
use App\Providers\AuthServiceProvider;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
class $CLASS$ extends ServiceProvider
class $CLASS$ extends AuthServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
@ -13,13 +14,24 @@ class $CLASS$ extends ServiceProvider
*/
protected $defer = false;
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
\Modules\$STUDLY_NAME$\Models\$STUDLY_NAME$::class => \Modules\$STUDLY_NAME$\Policies\$STUDLY_NAME$Policy::class,
];
/**
* Boot the application events.
*
* @return void
*/
public function boot()
public function boot(GateContract $gate)
{
parent::boot($gate);
$this->registerTranslations();
$this->registerConfig();
$this->registerViews();

View File

@ -113,7 +113,6 @@ return [
'notifications' => 'Notifications',
'datatable' => 'Datatables',
'policy' => 'Policies',
'auth-provider' => 'AuthProviders',
'presenter' => 'Presenters',
'api-controller' => 'Http/ApiControllers',
'transformer' => 'Transformers',