hootlex / laravel-moderation

A simple Content Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc.
MIT License
526 stars 68 forks source link

Remove references to AppUser to allow using custom models structure #24

Closed superbiche closed 7 years ago

superbiche commented 7 years ago

Hey there :)

We're using a custom-but-quite-common models structure, using App\Models instead of App as base namespace. Thus, ModerationScope using App\User is raising errors in our case, and so is the BaseTestCase acting as App\User.

Therefore, I only removed the use statement in ModerationScope (wasn't used), and used adamwathan/eloquent-oauth method of retrieving the user class from config('auth.providers.users.model', config('auth.model', 'App\User')) for BaseTestCase.

Hope it's okay, and thanks for this great package. Cheers,

hootlex commented 7 years ago

Hey,

Thanks for the PR and the detailed description. My first thought was to document the auth.model config option but since it's only used in the tests I think it will just be more confusing. So, merging right away! :)