Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Role | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| jsonSerialize | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 6 | use Illuminate\Database\Eloquent\Model; |
| 7 | |
| 8 | class Role extends Model |
| 9 | { |
| 10 | use HasFactory; |
| 11 | |
| 12 | /** |
| 13 | * Json Serialize |
| 14 | * |
| 15 | */ |
| 16 | public function jsonSerialize() |
| 17 | { |
| 18 | return [ |
| 19 | 'id' => $this->id, |
| 20 | 'name' => $this->name, |
| 21 | 'description' => $this->description, |
| 22 | ]; |
| 23 | |
| 24 | } // jsonSerialize |
| 25 | } |