Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moderation Trait Issue #41

Closed
lawkunchi opened this issue Jan 17, 2019 · 2 comments
Closed

Moderation Trait Issue #41

lawkunchi opened this issue Jan 17, 2019 · 2 comments

Comments

@lawkunchi
Copy link

I have a model and I added the Hootlex\Moderation\Moderatable trait as below

use Hootlex\Moderation\Moderatable;
class Post extends Model
{
    use Moderatable;
    ...
}

But my index blade that returns a list of submitted posts does not show unless I remove use Moderatable; from my model. So instead I added the trait to my controller, but now when I try to approve the post it gives this error Call to undefined method pending() reject() or postpone() . I also tried other ways to moderate an instance of a model provided in the documentation, and I get the same error. Please assist on a solution for thus error

@lawkunchi
Copy link
Author

@hootlex ping

@lawkunchi
Copy link
Author

I go the solution. So I found out if the strict mode is set to true it won't display resources unless approved
public static $strictModeration = false;

So I then set it to false in order to edit the resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant