TDoG-Skin/vendor/lorisleiva/laravel-search-string/tests/Stubs/CommentUser.php
2024-08-17 19:13:54 +08:00

28 lines
577 B
PHP
Executable File

<?php
namespace Lorisleiva\LaravelSearchString\Tests\Stubs;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Lorisleiva\LaravelSearchString\Concerns\SearchString;
class CommentUser extends Pivot
{
use SearchString;
protected $searchStringColumns = [
'comment' => ['relationship' => true],
'user' => ['relationship' => true],
'created_at' => 'date',
];
public function comment()
{
return $this->belongsTo(Comment::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}