feature/handle-multiple-countries (#45)
Reviewed-on: #45 Co-authored-by: Krzysiej <krzysiej@gmail.com> Co-committed-by: Krzysiej <krzysiej@gmail.com>
This commit was merged in pull request #45.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Krzysiej\RyobiCrawler\Models;
|
||||
use Carbon\Traits\Date;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
@@ -32,6 +33,11 @@ class Product extends Model
|
||||
public $timestamps = true;
|
||||
public $fillable = ['skuID'];
|
||||
|
||||
public function country(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public function price(): HasMany
|
||||
{
|
||||
return $this->hasMany(Price::class);
|
||||
|
||||
Reference in New Issue
Block a user