123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Repositories\Models\Base;
- use App\Repositories\Models\Model;
- class UserMessage extends Model
- {
- /**
- * @var string
- */
- protected $table = 'base_user_messages';
- protected $guarded = [];
- /**
- * The attributes excluded from the model's JSON form.
- *
- * @var array
- */
- protected $hidden = [];
- const IS_READ_OK = 1;
- const IS_READ_NO = 0;
- public function user()
- {
- return $this->morphTo('user')->select(['id', 'name']);
- }
- public function source()
- {
- return $this->morphTo('source');
- }
- }
|