Skip to content

Commit

Permalink
Style: Vista Crear Especialidad
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenU21 committed Dec 2, 2022
1 parent 36d48ed commit 0244213
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/SpecialtyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ public function index()
{
return view('specialties.index');
}

public function create()
{
return view ('specialties.create');
}
}
35 changes: 35 additions & 0 deletions resources/views/specialties/create.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@extends('layouts.panel')

@section('content')

<div class="card shadow">
<div class="card-header border-0">
<div class="row align-items-center">
<div class="col">
<h3 class="mb-0">Generando Nuevo</h3>
</div>
<div class="col text-right">
<a href="{{ url('/especialidades')}}" class="btn btn-sm btn-success">
<i class="fas fa-chevron-left"></i>
Volver</a>
</div>
</div>
</div>

<div class="card-body">
<form action="">
<div class="form-group">
<label for="name">Nombre</label>
<input type="text" name="name" class="form-control">
</div>

<div class="form-group">
<label for="description">Descripción</label>
<input type="text" name="description" class="form-control">
</div>
<button type="submit" class="btn btn-sm btn-primary">Añadir</button>
</form>
</div>

</div>
@endsection
2 changes: 1 addition & 1 deletion resources/views/specialties/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<thead class="thead-light">
<tr>
<th scope="col">Nombre</th>
<th scope="col">Description</th>
<th scope="col">Descripción</th>
<th scope="col">Opciones</th>
</tr>
</thead>
Expand Down
4 changes: 3 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');

Route::get('/especialidades', [App\Http\Controllers\SpecialtyController::class, 'index']);
Route::get('/especialidades/{specialty}/edit', [App\Http\Controllers\SpecialtyController::class, 'create']);

Route::get('/especialidades/create', [App\Http\Controllers\SpecialtyController::class, 'create']);
Route::get('/especialidades/{specialty}/edit', [App\Http\Controllers\SpecialtyController::class, 'edit']);
Route::post('/especialidades', [App\Http\Controllers\SpecialtyController::class, 'sendData']);

0 comments on commit 0244213

Please sign in to comment.