| 2 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace App\Models;
|
|
|
4 |
|
|
|
5 |
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
6 |
use Illuminate\Database\Eloquent\Model;
|
|
|
7 |
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
8 |
|
| 415 |
lars |
9 |
/**
|
|
|
10 |
* App\Models\DirectoryTemplate
|
|
|
11 |
*
|
|
|
12 |
* @property int $id
|
|
|
13 |
* @property int|null $template_id
|
|
|
14 |
* @property int|null $directory_id
|
|
|
15 |
* @property string $created_by
|
|
|
16 |
* @property string $updated_by
|
|
|
17 |
* @property \Illuminate\Support\Carbon|null $created_at
|
|
|
18 |
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
|
19 |
* @property-read \App\Models\Template|null $template
|
|
|
20 |
* @method static \Database\Factories\DirectoryTemplateFactory factory($count = null, $state = [])
|
|
|
21 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate newModelQuery()
|
|
|
22 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate newQuery()
|
|
|
23 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate query()
|
|
|
24 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereCreatedAt($value)
|
|
|
25 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereCreatedBy($value)
|
|
|
26 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereDirectoryId($value)
|
|
|
27 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereId($value)
|
|
|
28 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereTemplateId($value)
|
|
|
29 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereUpdatedAt($value)
|
|
|
30 |
* @method static \Illuminate\Database\Eloquent\Builder|DirectoryTemplate whereUpdatedBy($value)
|
|
|
31 |
* @mixin \Eloquent
|
|
|
32 |
*/
|
| 2 |
lars |
33 |
class DirectoryTemplate extends Model
|
|
|
34 |
{
|
|
|
35 |
use HasFactory;
|
|
|
36 |
|
|
|
37 |
function template(): BelongsTo
|
|
|
38 |
{
|
|
|
39 |
return $this->belongsTo(Template::class)->where( "type","=","directory" );
|
|
|
40 |
}
|
|
|
41 |
}
|