Seller.php 385 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Seller extends Model
  5. {
  6. protected $with = ['user', 'user.shop'];
  7. public function user(){
  8. return $this->belongsTo(User::class);
  9. }
  10. public function payments(){
  11. return $this->hasMany(Payment::class);
  12. }
  13. public function seller_package(){
  14. return $this->belongsTo(SellerPackage::class);
  15. }
  16. }