Add all files
This commit is contained in:
16
app/Models/Traits/HasProperties.php
Normal file
16
app/Models/Traits/HasProperties.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits;
|
||||
|
||||
use App\Models\Property;
|
||||
|
||||
trait HasProperties
|
||||
{
|
||||
/**
|
||||
* Get the properties of the model which has this trait
|
||||
*/
|
||||
public function properties()
|
||||
{
|
||||
return $this->morphMany(Property::class, 'model');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user