2016-04-17 00:34:39 +02:00
|
|
|
<?php namespace App\Models;
|
|
|
|
|
|
|
|
use Eloquent;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* Class Company
|
|
|
|
*/
|
2016-04-17 00:34:39 +02:00
|
|
|
class Company extends Eloquent
|
|
|
|
{
|
|
|
|
use SoftDeletes;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
2016-04-17 00:34:39 +02:00
|
|
|
protected $dates = ['deleted_at'];
|
2016-07-03 18:11:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
*/
|
2016-04-17 00:34:39 +02:00
|
|
|
public function accounts()
|
|
|
|
{
|
|
|
|
return $this->hasMany('App\Models\Account');
|
|
|
|
}
|
2016-07-03 18:11:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
*/
|
2016-04-17 00:34:39 +02:00
|
|
|
public function payment()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Models\Payment');
|
|
|
|
}
|
|
|
|
}
|