Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| TblBudgetStatus | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| statusExistByName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 6 | use Illuminate\Database\Eloquent\Model; |
| 7 | |
| 8 | class TblBudgetStatus extends Model |
| 9 | { |
| 10 | use HasFactory; |
| 11 | protected $table = 'tbl_budget_status'; |
| 12 | public $timestamps = false; |
| 13 | protected $fillable = [ |
| 14 | 'company_id', |
| 15 | 'name', |
| 16 | 'move_to_rejected_automatically', |
| 17 | 'days_to_move_to_rejected_automatically', |
| 18 | 'created_by', |
| 19 | 'created_at' |
| 20 | ]; |
| 21 | |
| 22 | /** |
| 23 | * Check if there is a record with the `internal_quote_id` equal to `$g3w_id`. |
| 24 | * @param $g3w_status_name String Text of the G3W satuts |
| 25 | * @return Boolean |
| 26 | */ |
| 27 | public static function statusExistByName($g3w_status_name) |
| 28 | { |
| 29 | return self::where('name', $g3w_status_name)->exists(); |
| 30 | } |
| 31 | } |