forked from mongodb/laravel-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoft.php
More file actions
37 lines (30 loc) · 839 Bytes
/
Soft.php
File metadata and controls
37 lines (30 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
declare(strict_types=1);
namespace MongoDB\Laravel\Tests\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use MongoDB\Laravel\Eloquent\Builder;
use MongoDB\Laravel\Eloquent\DocumentModel;
use MongoDB\Laravel\Eloquent\MassPrunable;
use MongoDB\Laravel\Eloquent\SoftDeletes;
/** @property Carbon $deleted_at */
class Soft extends Model
{
use DocumentModel;
use SoftDeletes;
use MassPrunable;
protected $primaryKey = '_id';
protected $keyType = 'string';
protected $connection = 'mongodb';
protected $table = 'soft';
protected static $unguarded = true;
protected $casts = ['deleted_at' => 'datetime'];
public function prunable(): Builder
{
return $this->newQuery();
}
public function user()
{
return $this->belongsTo(User::class);
}
}