Admin Approval

atef rihane posted 1 year ago

Hey Guys I want to know how can I set admin approval in my application, the fact that every post published by the user need the admin confirmation then it get displayed how can I do that?

Tobias van Beek replied 1 year ago Solution

The most easy way is to have a boolean flag on the post that is false by default. Then you need a page for the admin with the post to approve.

$posts = Post::where('approved', false)->get();

And on the page where you want to display the post you need to filter on approved to only show the approved ones. $posts = Post::where('approved', true)->get();

atef rihane replied 1 year ago

Thank you for the information ;)

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us