Skip to content

Commit d4aa18c

Browse files
committed
add HasFactory trait
1 parent 10e3846 commit d4aa18c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.phpunit.result.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":1,"defects":{"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_has_a_name":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_was_started":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_started":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_completed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_gets_a_command_record_by_name":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_been_requested":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_how_many_times_a_command_has_been_requested":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_in_progress_if_it_has_started_but_not_completed_or_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_not_started_or_it_has_completed_or_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_completed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_has_not_completed_if_it_has_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_retrieves_the_number_of_times_that_a_command_has_completed":4,"Warning":6},"times":{"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_has_a_name":0.299,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_was_started":0.018,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_started":0.008,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_completed":0.012,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_failed":0.015,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_gets_a_command_record_by_name":0.017,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_been_requested":0.019,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_how_many_times_a_command_has_been_requested":0.018,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_in_progress_if_it_has_started_but_not_completed_or_failed":0.017,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_not_started_or_it_has_completed_or_failed":0.016,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_failed":0.017,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_completed":0.015,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_has_not_completed_if_it_has_failed":0.014,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_retrieves_the_number_of_times_that_a_command_has_completed":0.018,"Warning":0.006}}
1+
{"version":1,"defects":{"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_has_a_name":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_was_started":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_started":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_completed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_gets_a_command_record_by_name":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_been_requested":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_how_many_times_a_command_has_been_requested":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_in_progress_if_it_has_started_but_not_completed_or_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_not_started_or_it_has_completed_or_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_completed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_has_not_completed_if_it_has_failed":4,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_retrieves_the_number_of_times_that_a_command_has_completed":4,"Warning":6},"times":{"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_has_a_name":0.322,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_was_started":0.016,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_started":0.013,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_the_command_has_completed":0.017,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_records_the_time_at_which_the_command_failed":0.013,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_gets_a_command_record_by_name":0.016,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_been_requested":0.014,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_how_many_times_a_command_has_been_requested":0.013,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_in_progress_if_it_has_started_but_not_completed_or_failed":0.016,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_not_started_or_it_has_completed_or_failed":0.013,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_is_not_in_progress_if_it_has_failed":0.012,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_checks_if_a_command_has_completed":0.011,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::a_command_has_not_completed_if_it_has_failed":0.01,"Konsulting\\Laravel\\MonitoredCommands\\Tests\\CommandRecordTest::it_retrieves_the_number_of_times_that_a_command_has_completed":0.016,"Warning":0.006}}

src/CommandRecord.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace Konsulting\Laravel\MonitoredCommands;
44

55
use Carbon\Carbon;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
67
use Illuminate\Database\Eloquent\Model;
78
use Illuminate\Database\Eloquent\SoftDeletes;
89
use Illuminate\Support\Collection;
910
use Konsulting\Laravel\EditorStamps\EditorStamps;
1011

1112
class CommandRecord extends Model
1213
{
13-
use EditorStamps, SoftDeletes;
14+
use HasFactory, EditorStamps, SoftDeletes;
1415

1516
/**
1617
* Allow mass assignment on all properties.

0 commit comments

Comments
 (0)