ProTransaction.php 520 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class ProTransaction extends Model
  5. {
  6. protected $table = 'pro_transaction';
  7. public function client() {
  8. return $this->belongsTo(Client::class);
  9. }
  10. public function bill() {
  11. return $this->belongsTo(Bill::class);
  12. }
  13. public function pro() {
  14. return $this->hasOne(Pro::class, 'id', 'pro_id');
  15. }
  16. public function company() {
  17. return $this->hasOne(Company::class, 'id', 'company_id');
  18. }
  19. }