UserOwnerGroup.php 338 B

123456789101112131415161718192021
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class UserOwnerGroup extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable = [
  9. "name" //名称
  10. ];
  11. public function usersFromAuth()
  12. {
  13. return $this->morphToMany(User::class, 'user_authable');
  14. }
  15. }