actualizado admin-projects

This commit is contained in:
Daniel Cortés
2019-10-14 12:07:40 -03:00
parent a98fa27d78
commit 82973e7ca8
3 changed files with 43 additions and 30 deletions

View File

@@ -5,22 +5,31 @@
@endsection
@section('content')
<table class="table">
<div class="table-heading">
<h1>Projects</h1>
<a class="pure-button button-black-white" href="{{ route('admin.project.create') }}">Add Project</a>
</div>
<table class="pure-table">
<thead>
<tr>
<th>Id</th>
<th>Titulo</th>
<th class="controls"><a href="{{ route('admin.project.create') }}">create</a></th>
<th>Fecha</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($projects as $project)
<tr>
<td>{{$project->title}}</td>
<td>{{$project->id}}</td>
<td>{{ Str::limit($project->title, 30, "...") }}</td>
<td>{{$project->created_at->format('Y-m-d')}}</td>
<td class="controls">
<a href="{{ route('admin.project.edit', ['project' => $project->id]) }}">edit</a>
<a href="{{ route('admin.project.edit', ['project' => $project->id]) }}" class="pure-button button-black-white">Edit</a>
<form action={{ route('admin.project.delete', ['project' => $project->id]) }} method="post">
@csrf
<input type="submit" value="delete"/>
<button type="submit" class="pure-button button-black-white" onclick="return confirm('Estas Seguro?')">Delete</button>
</form>
</td>
</tr>