Cree las rutas para la creacion de projectos

This commit is contained in:
Daniel Cortés
2019-07-03 01:28:51 -04:00
parent b15c2dc658
commit 53b709c175
22 changed files with 491 additions and 17 deletions

View File

@@ -0,0 +1,17 @@
@extends('admin.base')
@section('title')
<h1>Create Now</h1>
@endsection
@section('content')
<form action="{{ route('admin.now.save') }}" method="post">
@csrf
<div>
<label for="md">Contenido</label>
<textarea id="md" class="form-input" name="md"></textarea>
</div>
<input type="submit" class="form-submit" value="Crear"/>
</form>
@endsection

View File

@@ -0,0 +1,16 @@
@extends('admin.base')
@section('title')
<h1>Edit Now</h1>
@endsection
@section('content')
<form action="{{ route('admin.now.update', ['now' => $now->id]) }}" method="post">
@csrf
<div>
<label for="md">Contenido</label>
<textarea class="form-input" id="md" name="md">{{ old('md', $now->md) }}</textarea>
</div>
<input type="submit" class="form-submit" value="Actualizar"/>
</form>
@endsection

View File

@@ -0,0 +1,34 @@
@extends('admin.base')
@section('title')
<h1>Now</h1>
@endsection
@section('content')
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Fecha</th>
<th class="controls"><a href="{{ route('admin.now.create') }}">create</a></th>
</tr>
</thead>
<tbody>
@foreach($nows as $now)
<tr>
<td>{{$now->id}}</td>
<td>{{$now->created_at->format('Y-m-d')}}</td>
<td class="controls">
<a href="{{ route('admin.now.edit', ['now' => $now->id]) }}">edit</a>
<form action={{ route('admin.now.delete', ['now' => $now->id]) }} method="post">
@csrf
<input type="submit" value="delete"/>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection