From 6fd9833dda5c416aecb7d7d3147f4cc2c583ccb9 Mon Sep 17 00:00:00 2001 From: nat Date: Thu, 6 Jan 2022 16:20:21 -0300 Subject: [PATCH] =?UTF-8?q?Primer=20p=C3=A1gina=20de=20frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/main.js | 10 +++ resources/views/inicio.blade.php | 31 +++++++++ resources/views/welcome.blade.php | 100 ------------------------------ routes/api.php | 4 +- routes/web.php | 2 +- 5 files changed, 45 insertions(+), 102 deletions(-) create mode 100644 public/js/main.js create mode 100644 resources/views/inicio.blade.php delete mode 100644 resources/views/welcome.blade.php diff --git a/public/js/main.js b/public/js/main.js new file mode 100644 index 0000000..ab54335 --- /dev/null +++ b/public/js/main.js @@ -0,0 +1,10 @@ +new Vue({ + el: '#select', + data: { + regiones: [] + }, + mounted() { + axios.get("/api/regiones").then(response => this.regiones = response.data); + } + +}) \ No newline at end of file diff --git a/resources/views/inicio.blade.php b/resources/views/inicio.blade.php new file mode 100644 index 0000000..076b2f3 --- /dev/null +++ b/resources/views/inicio.blade.php @@ -0,0 +1,31 @@ + + + + + + Compras del MPS + + + +
+
+

+ Compras MPS +

+

+ Bienvenidx a la aplicación de compras del Mercado Popular de Subsistencia +

+ +
+ +
+
+
+ + + + + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php deleted file mode 100644 index 7bc3372..0000000 --- a/resources/views/welcome.blade.php +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - Laravel - - - - - - - - -
- @if (Route::has('login')) - - @endif - -
-
- Laravel -
- - -
-
- - diff --git a/routes/api.php b/routes/api.php index cee4d6f..9df94ce 100644 --- a/routes/api.php +++ b/routes/api.php @@ -16,7 +16,7 @@ use App\Producto; | */ -Route::middleware('auth:api')->group(function () { +Route::middleware('api')->group(function () { Route::get('/regiones', function() { return GrupoDeCompra::all()->pluck('region')->unique()->flatten(); }); @@ -28,10 +28,12 @@ Route::middleware('auth:api')->group(function () { }); }); + //@TO DO -> esta ruta debe estar en middleware de autenticacion Route::get('/categorias', function() { return Producto::all()->pluck('categoria')->unique()->flatten(); }); + //@TO DO -> esta ruta debe estar en middleware de autenticacion Route::prefix('productos')->group(function () { Route::get('/','Api\ProductoController@index'); }); diff --git a/routes/web.php b/routes/web.php index b130397..f7452f4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,5 +14,5 @@ use Illuminate\Support\Facades\Route; */ Route::get('/', function () { - return view('welcome'); + return view('inicio'); });