@@ -7,7 +7,7 @@ |
||
| 7 | 7 | public function scopeByClassesByNames($query, array $attributes, $key = 'name') |
| 8 | 8 | { |
| 9 | 9 | foreach ($attributes as $type => $slugs) { |
| 10 | - if (! empty($slugs)) { |
|
| 10 | + if (!empty($slugs)) { |
|
| 11 | 11 | $names = is_array($slugs) ? $slugs : [$slugs]; |
| 12 | 12 | $query->orWhere('slugable_type', $type)->whereIn($key, $names); |
| 13 | 13 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $prefix = $this->slugConfig['prefix']; |
| 39 | 39 | $suffix = $this->slugConfig['suffix']; |
| 40 | 40 | |
| 41 | - $maximumLength= $this->slugConfig['maximum_length']; |
|
| 41 | + $maximumLength = $this->slugConfig['maximum_length']; |
|
| 42 | 42 | |
| 43 | 43 | if ($strLen = strlen($prefix) + strlen($suffix)) { |
| 44 | 44 | $limitWithoutPrefixSuffix = $maximumLength - ($strLen + 2); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $slugs = is_array($slug) ? $slug : [$slug]; |
| 37 | 37 | |
| 38 | - return $query->whereHas('slug', function ($q) use ($slugs) { |
|
| 38 | + return $query->whereHas('slug', function($q) use ($slugs) { |
|
| 39 | 39 | $q->whereIn('name', $slugs); |
| 40 | 40 | }); |
| 41 | 41 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | __DIR__.'/../config/slugmaker.php' => $this->app->configPath().'/slugmaker.php', |
| 14 | 14 | ], 'slugmaker-config'); |
| 15 | 15 | |
| 16 | - if (! class_exists('CreateSlugsTable')) { |
|
| 16 | + if (!class_exists('CreateSlugsTable')) { |
|
| 17 | 17 | $timestamp = date('Y_m_d_His', time()); |
| 18 | 18 | |
| 19 | 19 | $this->publishes([ |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $this->mergeConfigFrom(__DIR__.'/../config/slugmaker.php', 'slugmaker-config'); |
| 28 | 28 | |
| 29 | - $this->app->bind(SlugHelper::class, function () { |
|
| 29 | + $this->app->bind(SlugHelper::class, function() { |
|
| 30 | 30 | return new SlugHelper(new Slug()); |
| 31 | 31 | }); |
| 32 | 32 | } |