1
0
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:
2022-05-29 04:21:56 +07:00
parent ff7fe27698
commit fe2e5d316c
13 changed files with 272 additions and 10 deletions

View File

@@ -19,4 +19,13 @@ class Feedback extends Model
'comment',
'rating',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'rating' => 'integer',
];
}

View File

@@ -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.

View File

@@ -34,4 +34,9 @@ class User extends Authenticatable
protected $hidden = [
'password',
];
public function feedback()
{
return $this->hasMany(Feedback::class);
}
}