diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 927be5d..dc58891 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -38,14 +38,14 @@ class RouteServiceProvider extends ServiceProvider $this->configureRateLimiting(); $this->routes(function () { - Route::prefix('api') + Route::prefix('user/v1') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); - Route::middleware('web') - ->namespace($this->namespace) - ->group(base_path('routes/web.php')); + // Route::middleware('web') + // ->namespace($this->namespace) + // ->group(base_path('routes/web.php')); }); } diff --git a/bootstrap/app.php b/bootstrap/app.php index fdcb8bd..037e17d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -52,11 +52,4 @@ $app->singleton( | */ -$app->router->group([ - 'namespace' => 'App\Http\Controllers', - 'prefix' => '/user/v1/' -], function ($router) { - require __DIR__.'/../routes/api.php'; -}); - return $app; diff --git a/config/cors.php b/config/cors.php index b2930d0..4598a66 100644 --- a/config/cors.php +++ b/config/cors.php @@ -1,27 +1,13 @@ ['api/*', 'sanctum/csrf-cookie'], + 'paths' => ['user/v1/*'], 'allowed_methods' => ['*'], 'allowed_origins' => ['*'], - 'allowed_origins_patterns' => ['Content-Type', 'X-Requested-With'], + 'allowedOriginsPatterns' => ['Content-Type', 'X-Requested-With'], 'allowed_headers' => ['*'], diff --git a/config/cors.php.laravel b/config/cors.php.laravel index c3ded3c..756b4ee 100644 --- a/config/cors.php.laravel +++ b/config/cors.php.laravel @@ -1,59 +1,19 @@ ['/*'], - /* - * Matches the request method. `['*']` allows all methods. - */ 'allowed_methods' => ['*'], - /* - * Matches the request origin. `['*']` allows all origins. Wildcards can be used, eg `*.mydomain.com` - */ 'allowed_origins' => ['*'], - /* - * Patterns that can be used with `preg_match` to match the origin. - */ 'allowedOriginsPatterns' => ['Content-Type', 'X-Requested-With'], - /* - * Sets the Access-Control-Allow-Headers response header. `['*']` allows all headers. - */ 'allowed_headers' => ['*'], - /* - * Sets the Access-Control-Expose-Headers response header with these headers. - */ 'exposed_headers' => [], - /* - * Sets the Access-Control-Max-Age response header when > 0. - */ 'max_age' => 0, - /* - * Sets the Access-Control-Allow-Credentials header. - */ 'supports_credentials' => false, ]; diff --git a/config/cors.php.lumen b/config/cors.php.lumen index 8a39e6d..aa2f995 100644 --- a/config/cors.php.lumen +++ b/config/cors.php.lumen @@ -1,20 +1,6 @@ ['api/*', 'sanctum/csrf-cookie'], 'allowed_methods' => ['*'], diff --git a/database/migrations/2020_08_18_085017_fingerprints.php b/database/migrations/2020_08_18_085017_fingerprints.php index 6a72833..d44e60d 100644 --- a/database/migrations/2020_08_18_085017_fingerprints.php +++ b/database/migrations/2020_08_18_085017_fingerprints.php @@ -22,7 +22,7 @@ class Fingerprints extends Migration $table->decimal('latitude', 10, 4); $table->decimal('longitude', 11, 4); $table->char('token', 60)->unique(); - $table->text('fcm_token')->unique()->nullable(); + $table->text('fcm_token')->nullable(); $table->timestamps(); }); }