@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Support\Facades\Route; |
4 | 4 | |
5 | -Route::middleware(['auth:api'])->group(function () { |
|
5 | +Route::middleware(['auth:api'])->group(function() { |
|
6 | 6 | Route::get('urls', 'UrlController@index'); |
7 | 7 | Route::post('urls', 'UrlController@create'); |
8 | 8 | Route::get('urls/{path}', 'UrlController@show'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function getData(string $column, int $urlId, string $startDate, string $endDate): object |
34 | 34 | { |
35 | - if (! in_array($column, ['country', 'region', 'city', 'device_type', 'device_brand', 'device_model', 'os', 'browser', 'referer', 'referer_host'])) { |
|
35 | + if (!in_array($column, ['country', 'region', 'city', 'device_type', 'device_brand', 'device_model', 'os', 'browser', 'referer', 'referer_host'])) { |
|
36 | 36 | throw ValidationException::withMessages([ |
37 | 37 | 'column' => [__('Unsupported column.')], |
38 | 38 | ]); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | $user = $request->user(); |
33 | 33 | |
34 | - if (! $user->hasAnyPermission(['url:view', 'url:view:any'])) { |
|
34 | + if (!$user->hasAnyPermission(['url:view', 'url:view:any'])) { |
|
35 | 35 | abort(401); |
36 | 36 | } |
37 | 37 |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | |
5 | -$factory->define(Devpri\Tinre\Models\Click::class, function (Faker $faker) { |
|
5 | +$factory->define(Devpri\Tinre\Models\Click::class, function(Faker $faker) { |
|
6 | 6 | return [ |
7 | 7 | 'country' => $faker->countryCode, |
8 | 8 | 'region' => $faker->state, |
@@ -19,17 +19,17 @@ |
||
19 | 19 | if ($token = $this->request->bearerToken()) { |
20 | 20 | $accessToken = AccessToken::findToken($token); |
21 | 21 | |
22 | - if (! $accessToken) { |
|
22 | + if (!$accessToken) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
26 | 26 | $user = $accessToken->user; |
27 | 27 | |
28 | - if (! $user->active) { |
|
28 | + if (!$user->active) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
32 | - if (! $user->hasApiAccess()) { |
|
32 | + if (!$user->hasApiAccess()) { |
|
33 | 33 | return; |
34 | 34 | } |
35 | 35 |