Creo que termine con el admin del post
This commit is contained in:
24
resources/sass/admin.scss
vendored
24
resources/sass/admin.scss
vendored
@@ -94,13 +94,27 @@ table {
|
||||
}
|
||||
|
||||
td.controls {
|
||||
a {
|
||||
a, input[type=submit]{
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display:block;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
letter-spacing: .1em;
|
||||
|
||||
color: $colorfg;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
border: 0;
|
||||
background-color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
th.controls {
|
||||
@@ -122,6 +136,7 @@ form {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: .9em;
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
input[type=text], textarea{
|
||||
@@ -133,15 +148,18 @@ form {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 1em;
|
||||
padding: .4em;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
box-sizing: border-box;
|
||||
height: 30em;
|
||||
}
|
||||
|
||||
|
||||
input[type=submit]{
|
||||
.button{
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<label for="md">Contenido</label>
|
||||
<textarea id="md" name="md"></textarea>
|
||||
</div>
|
||||
<input type="submit" value="Crear"/>
|
||||
<input type="submit" class="button" value="Crear"/>
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
20
resources/views/admin/posts/edit.blade.php
Normal file
20
resources/views/admin/posts/edit.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
@extends('admin.base')
|
||||
|
||||
@section('title')
|
||||
<h1>Edit Post</h1>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.post.update', ['post' => $post->id]) }}" method="post">
|
||||
@csrf
|
||||
<div>
|
||||
<label for="title">Titulo</label>
|
||||
<input type="text" id="title" name="title" value="{{ old('title', $post->title) }}" required/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="md">Contenido</label>
|
||||
<textarea id="md" name="md">{{ old('md', $post->md) }}</textarea>
|
||||
</div>
|
||||
<input type="submit" class="button" value="Actualizar"/>
|
||||
</form>
|
||||
@endsection
|
||||
@@ -21,8 +21,11 @@
|
||||
<td>{{$post->title}}</td>
|
||||
<td>{{$post->created_at->format('Y-m-d')}}</td>
|
||||
<td class="controls">
|
||||
<a href="#">edit</a>
|
||||
<a href="#">delete</a>
|
||||
<a href="{{ route('admin.post.edit', ['post' => $post->id]) }}">edit</a>
|
||||
<form action={{ route('admin.post.delete', ['post' => $post->id]) }} method="post">
|
||||
@csrf
|
||||
<input type="submit" value="delete"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user