agregada la opcion de published a los posts

This commit is contained in:
Daniel Cortés
2019-10-17 08:00:53 -03:00
parent 877477503c
commit 2fcbf51071
8 changed files with 49 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ class PostController extends Controller
$post = new Post();
$post->title = $request->title;
$post->md = $request->md;
$post->is_published = $request->has('published');
$post->save();
return redirect()->route('admin.post.index');
@@ -41,6 +42,7 @@ class PostController extends Controller
$post->title = $request->title;
$post->md = $request->md;
$post->is_published = $request->has('published');
$post->update();
return redirect()->route('admin.post.index');