1 | <?php |
||
2 | |||
3 | namespace MaksimM\CompositePrimaryKeys\Tests\Stubs; |
||
4 | |||
5 | use Illuminate\Database\Eloquent\Model; |
||
6 | |||
7 | class TestUserNonComposite extends Model |
||
8 | { |
||
9 | use \MaksimM\CompositePrimaryKeys\Http\Traits\HasCompositePrimaryKey; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
10 | |||
11 | protected $table = 'non_composite_users'; |
||
12 | |||
13 | protected $primaryKey = 'user_id'; |
||
14 | |||
15 | protected $fillable = [ |
||
16 | 'name', |
||
17 | ]; |
||
18 | |||
19 | public function organization() |
||
20 | { |
||
21 | return $this->belongsTo('TestOrganization', 'organization_id', 'organization_id'); |
||
22 | } |
||
23 | } |
||
24 |