Skip to content

Commit

Permalink
add pw toggle check
Browse files Browse the repository at this point in the history
  • Loading branch information
hellozach committed Nov 9, 2018
1 parent ed7fc17 commit f8e2252
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Http/Controllers/PostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ public function show(Request $request, $slug)
{
$post = Post::where('slug', $slug)->where('type', 'post')->firstOrFail();

dd($post->password);

if (!$request->password && $post->password && !$request->session()->get("post-pw-{$post->id}")) {
if (!$request->password && $post->password_protected && $post->password && !$request->session()->get("post-pw-{$post->id}")) {
return view('gazette::password');
}

Expand Down

0 comments on commit f8e2252

Please sign in to comment.