| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | */ | 
| 30 | 30 | public function fields(Request $request) | 
| 31 | 31 |  	{ | 
| 32 | -		$guardOptions = collect(config('auth.guards'))->mapWithKeys(function ($value, $key) { | |
| 32 | +		$guardOptions = collect(config('auth.guards'))->mapWithKeys(function($value, $key) { | |
| 33 | 33 | return [$key => $key]; | 
| 34 | 34 | }); | 
| 35 | 35 | |
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | return [ | 
| 4 | - 'name' => 'Name', | |
| 5 | - 'guard_name' => 'Guard Name', | |
| 6 | - 'created_at' => 'Created at', | |
| 7 | - 'updated_at' => 'Updated at', | |
| 4 | + 'name' => 'Name', | |
| 5 | + 'guard_name' => 'Guard Name', | |
| 6 | + 'created_at' => 'Created at', | |
| 7 | + 'updated_at' => 'Updated at', | |
| 8 | 8 | ]; | 
| 9 | 9 | \ No newline at end of file | 
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | return [ | 
| 4 | - 'Roles' => 'Roles', | |
| 5 | - 'Role' => 'Role', | |
| 6 | - 'Permissions' => 'Permissions', | |
| 7 | - 'Permission' => 'Permission', | |
| 4 | + 'Roles' => 'Roles', | |
| 5 | + 'Role' => 'Role', | |
| 6 | + 'Permissions' => 'Permissions', | |
| 7 | + 'Permission' => 'Permission', | |
| 8 | 8 | ]; | 
| 9 | 9 | \ No newline at end of file | 
| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | return [ | 
| 4 | - 'name' => 'Name', | |
| 5 | - 'display_name' => 'Display Name', | |
| 6 | - 'guard_name' => 'Guard Name', | |
| 7 | - 'created_at' => 'Created at', | |
| 8 | - 'updated_at' => 'Updated at', | |
| 4 | + 'name' => 'Name', | |
| 5 | + 'display_name' => 'Display Name', | |
| 6 | + 'guard_name' => 'Guard Name', | |
| 7 | + 'created_at' => 'Created at', | |
| 8 | + 'updated_at' => 'Updated at', | |
| 9 | 9 | ]; | 
| 10 | 10 | \ No newline at end of file | 
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | return [ | 
| 4 | - 'sidebar-label' => 'Roles & Permissions', | |
| 4 | + 'sidebar-label' => 'Roles & Permissions', | |
| 5 | 5 | ]; | 
| 6 | 6 | \ No newline at end of file | 
| @@ -40,7 +40,7 @@ | ||
| 40 | 40 |  	public static function getGuardForModel(string $model) { | 
| 41 | 41 | |
| 42 | 42 |  		return collect(config('auth.guards')) | 
| 43 | -			->map(function ($guard) { | |
| 43 | +			->map(function($guard) { | |
| 44 | 44 |  				return config("auth.providers.{$guard['provider']}.model"); | 
| 45 | 45 | })->search($model); | 
| 46 | 46 | } | 
| @@ -12,10 +12,10 @@ | ||
| 12 | 12 | public function boot() | 
| 13 | 13 |  	{ | 
| 14 | 14 | $this->loadViewsFrom(__DIR__ . '/../resources/views', 'laravel-nova-permission'); | 
| 15 | - $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'laravel-nova-permission'); | |
| 15 | + $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'laravel-nova-permission'); | |
| 16 | 16 | |
| 17 | 17 | $this->publishes([ | 
| 18 | -			__DIR__.'/../resources/lang' => resource_path('lang/vendor/laravel-nova-permission'), | |
| 18 | +			__DIR__ . '/../resources/lang' => resource_path('lang/vendor/laravel-nova-permission'), | |
| 19 | 19 | ], 'laravel-nova-permission-lang'); | 
| 20 | 20 | } | 
| 21 | 21 | |
| @@ -18,7 +18,7 @@ discard block | ||
| 18 | 18 | */ | 
| 19 | 19 |  	public function title() { | 
| 20 | 20 | |
| 21 | -		return __('laravel-nova-permission::permissions.display_names.'.$this->name); | |
| 21 | +		return __('laravel-nova-permission::permissions.display_names.' . $this->name); | |
| 22 | 22 | } | 
| 23 | 23 | |
| 24 | 24 | /** | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | */ | 
| 31 | 31 | protected static function applySearch($query, $search) | 
| 32 | 32 |  	{ | 
| 33 | -		return $query->where(function ($query) use ($search) { | |
| 33 | +		return $query->where(function($query) use ($search) { | |
| 34 | 34 |  			if (is_numeric($search) && in_array($query->getModel()->getKeyType(), ['int', 'integer'])) { | 
| 35 | 35 | $query->orWhere($query->getModel()->getQualifiedKeyName(), $search); | 
| 36 | 36 | } | 
| @@ -41,14 +41,14 @@ discard block | ||
| 41 | 41 | |
| 42 | 42 | $likeOperator = $connectionType == 'pgsql' ? 'ilike' : 'like'; | 
| 43 | 43 | |
| 44 | -			$trans_search = array_keys(preg_grep("/$search/",array_dot(__('laravel-nova-permission::permissions.display_names')))); | |
| 44 | +			$trans_search = array_keys(preg_grep("/$search/", array_dot(__('laravel-nova-permission::permissions.display_names')))); | |
| 45 | 45 | |
| 46 | 46 |  			foreach (static::searchableColumns() as $column) { | 
| 47 | 47 | $qualify_column = $model->qualifyColumn($column); | 
| 48 | -				foreach ($trans_search as $t_search){ | |
| 49 | - $query->orWhere($qualify_column, $likeOperator, '%'.$t_search.'%'); | |
| 48 | +				foreach ($trans_search as $t_search) { | |
| 49 | + $query->orWhere($qualify_column, $likeOperator, '%' . $t_search . '%'); | |
| 50 | 50 | } | 
| 51 | - $query->orWhere($qualify_column, $likeOperator, '%'.$search.'%'); | |
| 51 | + $query->orWhere($qualify_column, $likeOperator, '%' . $search . '%'); | |
| 52 | 52 | } | 
| 53 | 53 | }); | 
| 54 | 54 | } | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | */ | 
| 31 | 31 | public function fields(Request $request) | 
| 32 | 32 |  	{ | 
| 33 | -		$guardOptions = collect(config('auth.guards'))->mapWithKeys(function ($value, $key) { | |
| 33 | +		$guardOptions = collect(config('auth.guards'))->mapWithKeys(function($value, $key) { | |
| 34 | 34 | return [$key => $key]; | 
| 35 | 35 | }); | 
| 36 | 36 | |
| @@ -46,9 +46,9 @@ discard block | ||
| 46 | 46 |  				->creationRules('unique:' . config('permission.table_names.permissions')) | 
| 47 | 47 |  				->updateRules('unique:' . config('permission.table_names.permissions') . ',name,{{resourceId}}'), | 
| 48 | 48 | |
| 49 | -			Text::make(__('laravel-nova-permission::permissions.display_name'),function (){ | |
| 50 | -				return __('laravel-nova-permission::permissions.display_names.'.$this->name); | |
| 51 | -			})->canSee(function (){ | |
| 49 | +			Text::make(__('laravel-nova-permission::permissions.display_name'), function() { | |
| 50 | +				return __('laravel-nova-permission::permissions.display_names.' . $this->name); | |
| 51 | +			})->canSee(function() { | |
| 52 | 52 |  				return is_array(__('laravel-nova-permission::permissions.display_names')); | 
| 53 | 53 | }), | 
| 54 | 54 | |