mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 02:44:42 +00:00
Offer filters and user feedback
This commit is contained in:
@@ -19,4 +19,13 @@ class Feedback extends Model
|
||||
'comment',
|
||||
'rating',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'rating' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\OrderTypesEnum;
|
||||
use App\Filters\Filterable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Offer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory, Filterable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
|
||||
@@ -34,4 +34,9 @@ class User extends Authenticatable
|
||||
protected $hidden = [
|
||||
'password',
|
||||
];
|
||||
|
||||
public function feedback()
|
||||
{
|
||||
return $this->hasMany(Feedback::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user