Studio.php 448 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Studio extends Model
  5. {
  6. protected $table='studios';
  7. public function get_order(){
  8. return $this->hasMany(Ordertest::class,'user_id','user_id');
  9. }
  10. public function get_user(){
  11. return $this->belongsTo(User::class,'user_id');
  12. }
  13. public function get_bonus(){
  14. return $this->belongsTo(StudioUser::class,'user_id','user_id');
  15. }
  16. }