Skip to content

Commit 02d277f

Browse files
committed
php cs
1 parent 4c496cd commit 02d277f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Http/Middleware/HasCrmAccess.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ public function handle($request, Closure $next)
3131
'crm_access' => 1,
3232
])->save();
3333
} elseif (config('laravel-crm.teams') && auth()->user()->currentTeam->user_id == auth()->user()->id && ! auth()->user()->hasRole('Owner')) {
34-
35-
if($role = Role::where([
34+
if ($role = Role::where([
3635
'name' => 'Owner',
3736
'team_id' => auth()->user()->currentTeam->id,
38-
'crm_role' => 1
39-
])->first()){
37+
'crm_role' => 1,
38+
])->first()) {
4039
auth()->user()->assignRole($role->name);
4140
}
4241

src/LaravelCrmServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ class_alias('App\Models\Team', 'App\Team');
8484
// Middleware
8585
$router->aliasMiddleware('auth.laravel-crm', Authenticate::class);
8686

87-
if(config('laravel-crm.teams')){
87+
if (config('laravel-crm.teams')) {
8888
$router->pushMiddlewareToGroup('web', TeamsPermission::class);
89-
$router->pushMiddlewareToGroup('api', TeamsPermission::class);
89+
$router->pushMiddlewareToGroup('api', TeamsPermission::class);
9090
}
9191

9292
$router->pushMiddlewareToGroup('crm', Settings::class);

0 commit comments

Comments
 (0)