mas css, la parte de adminn esta casi casi <3
This commit is contained in:
@@ -8,11 +8,15 @@
|
||||
<form class="pure-form pure-form-stacked" action="{{ route('admin.post.save') }}" method="post">
|
||||
@csrf
|
||||
<fieldset>
|
||||
<h1>Create post</h1>
|
||||
<a class="pure-button button-black-white" href="{{ route('admin.post.index') }}">Volver</a>
|
||||
|
||||
<label for="title">Titulo</label>
|
||||
<input type="text" id="title" name="title" required/>
|
||||
|
||||
<label for="md">Contenido</label>
|
||||
<textarea id="md" name="md"></textarea>
|
||||
|
||||
<div class="control">
|
||||
<button class="pure-button button-black-white" type="submit">Crear</button>
|
||||
</div>
|
||||
|
||||
@@ -8,14 +8,18 @@
|
||||
<form class="pure-form pure-form-stacked" action="{{ route('admin.post.update', ['post' => $post->id]) }}" method="post">
|
||||
@csrf
|
||||
<fieldset>
|
||||
<h1>Editar Post</h1>
|
||||
<a href="{{ route('admin.post.index') }}" class="pure-button button-black-white">Volver</a>
|
||||
|
||||
<label for="title">Titulo</label>
|
||||
<input type="text" id="title" name="title" value="{{ old('title', $post->title) }}" required/>
|
||||
|
||||
<label for="md">Contenido</label>
|
||||
<textarea id="md" name="md">{{ old('md', $post->md) }}</textarea>
|
||||
|
||||
<div class="control">
|
||||
<button type="submit" class="pure-button button-black-white">Actualizar</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -14,20 +14,19 @@
|
||||
<th>Titulo</th>
|
||||
<th>Fecha</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($posts as $post)
|
||||
<tr>
|
||||
<td>{{$post->id}}</td>
|
||||
<td>{{$post->title}}</td>
|
||||
<td>{{ Str::limit($post->title, 30, "...") }}</td>
|
||||
<td>{{$post->created_at->format('Y-m-d')}}</td>
|
||||
<td class="controls">
|
||||
<a href="{{ route('admin.post.edit', ['post' => $post->id]) }}">Edit</a>
|
||||
<a href="{{ route('admin.post.edit', ['post' => $post->id]) }}" class="pure-button button-black-white">Edit</a>
|
||||
<form action={{ route('admin.post.delete', ['post' => $post->id]) }} method="post">
|
||||
@csrf
|
||||
<button type="submit" class="link" onclick="return confirm('Estas seguro?')">Delete</button>
|
||||
<button type="submit" class="pure-button button-black-white" onclick="return confirm('Estas seguro?')">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user