Download core/app/Models/Review.php from pnacorp/codeplus: direct link, hf CLI and curl.
- Browser
- Download file 617 Bytes
-
https://huggingface.co/pnacorp/codeplus/resolve/main/core/app/Models/Review.php
- Command line
-
hf download hf://pnacorp/codeplus/core/app/Models/Review.php
-
curl -L -o Review.php https://huggingface.co/pnacorp/codeplus/resolve/main/core/app/Models/Review.php
617 Bytes
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Review extends Model | |
| { | |
| public function product() | |
| { | |
| return $this->belongsTo(Product::class); | |
| } | |
| public function user() | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| public function author() | |
| { | |
| return $this->belongsTo(User::class, 'author_id', 'id'); | |
| } | |
| public function category() | |
| { | |
| return $this->belongsTo(ReviewCategory::class, 'review_category_id', 'id'); | |
| } | |
| public function replies() | |
| { | |
| return $this->hasMany(Comment::class, 'review_id'); | |
| } | |
| } | |