Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
PromptExample
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 boot
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 promptType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Http\Models\Prompts;
4
5use Illuminate\Database\Eloquent\Factories\HasFactory;
6use App\Http\Models\Moloquent;
7
8class PromptExample extends Moloquent
9{
10  use HasFactory;
11
12  protected $table = 'prompt_example';
13
14  protected $fillable = [
15    'prompt_type_id',
16    'input',
17    'output',
18    'is_active',
19  ];
20
21  /**
22   * The attributes that should be hidden for arrays.
23   *
24   * @var array
25   */
26  protected $hidden = [];
27
28  /**
29   * The accessors to append to the model's array form.
30   *
31   * @var array
32   */
33  protected $appends = [];
34
35  /**
36   * The "booting" method of the model.
37   */
38  protected static function boot(): void
39  {
40    parent::boot();
41  }
42
43  public function promptType()
44  {
45    return $this->belongsTo(PromptType::class, 'prompt_type_id');
46  }
47}