QappChannelAccount.php 605 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Modules\User\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class QappChannelAccount extends Model
  5. {
  6. protected $table = 'qapp_channel_accounts';
  7. protected $fillable = [
  8. 'account',
  9. 'password',
  10. 'channel_user_id',
  11. 'distribution_channel_id',
  12. 'remark',
  13. 'is_enabled',
  14. 'is_deleted',
  15. 'created_at',
  16. 'updated_at',
  17. ];
  18. public static function getByAccount($account)
  19. {
  20. if (empty($account)) {
  21. return [];
  22. }
  23. return self::where('account', $account)->first();
  24. }
  25. }