diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c1575c9..df85c12 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,11 @@ blank_issues_enabled: false contact_links: - name: Ask a question - url: https://github.com/timothepearce/laravel-cargo/discussions/new?category=q-a + url: https://github.com/timothepearce/laravel-quasar/discussions/new?category=q-a about: Ask the community for help - name: Request a feature - url: https://github.com/timothepearce/laravel-cargo/discussions/new?category=ideas + url: https://github.com/timothepearce/laravel-quasar/discussions/new?category=ideas about: Share ideas for new features - name: Report a bug - url: https://github.com/timothepearce/laravel-cargo/issues/new + url: https://github.com/timothepearce/laravel-quasar/issues/new about: Report a reproducable bug diff --git a/README.md b/README.md index be78658..31aa589 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ composer require laravelcargo/laravel-cargo You can publish and run the migrations with: ```bash -php artisan vendor:publish --provider="Laravelcargo\LaravelCargo\LaravelCargoServiceProvider" --tag="laravel-cargo-migrations" +php artisan vendor:publish --provider="Laravelcargo\LaravelCargo\QuasarServiceProvider" --tag="laravel-cargo-migrations" php artisan migrate ``` You can publish the config file with: ```bash -php artisan vendor:publish --provider="Laravelcargo\LaravelCargo\LaravelCargoServiceProvider" --tag="laravel-cargo-config" +php artisan vendor:publish --provider="Laravelcargo\LaravelCargo\QuasarServiceProvider" --tag="laravel-cargo-config" ``` This is the contents of the published config file: diff --git a/composer.json b/composer.json index ad0e62a..4850adf 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,16 @@ { - "name": "timothepearce/laravel-cargo", + "name": "timothepearce/laravel-quasar", "description": "This is my package LaravelCargo", "keywords": [ - "LaravelCargo", + "LaravelQuasar", + "laravel-quasar", "laravel", - "laravel-cargo" + "quasar", + "statistics", + "projections", + "projectors" ], - "homepage": "https://github.com/timothepearce/laravel-cargo", + "homepage": "https://github.com/timothepearce/laravel-quasar", "license": "MIT", "authors": [ { @@ -29,13 +33,13 @@ }, "autoload": { "psr-4": { - "Laravelcargo\\LaravelCargo\\": "src" + "TimothePearce\\Quasar\\": "src" } }, "autoload-dev": { "psr-4": { - "Laravelcargo\\LaravelCargo\\Tests\\": "tests", - "Laravelcargo\\LaravelCargo\\Tests\\Database\\Factories\\": "tests/database/factories" + "TimothePearce\\Quasar\\Tests\\": "tests", + "TimothePearce\\Quasar\\Tests\\Database\\Factories\\": "tests/database/factories" } }, "scripts": { @@ -49,7 +53,7 @@ "extra": { "laravel": { "providers": [ - "Laravelcargo\\LaravelCargo\\LaravelCargoServiceProvider" + "TimothePearce\\Quasar\\QuasarServiceProvider" ] } }, diff --git a/src/Commands/CreateProjectorCommand.php b/src/Commands/CreateProjectionCommand.php similarity index 75% rename from src/Commands/CreateProjectorCommand.php rename to src/Commands/CreateProjectionCommand.php index 81ad5bb..e712108 100644 --- a/src/Commands/CreateProjectorCommand.php +++ b/src/Commands/CreateProjectionCommand.php @@ -1,25 +1,25 @@ option('key') ? - __DIR__ . '/stubs/KeyedProjector.php.stub' : - __DIR__ . '/stubs/Projector.php.stub'; + __DIR__ . '/stubs/KeyedProjection.php.stub' : + __DIR__ . '/stubs/Projection.php.stub'; } /** @@ -36,7 +36,7 @@ protected function getStub() */ protected function getDefaultNamespace($rootNamespace) { - return $rootNamespace . '\Projectors'; + return $rootNamespace . '\Models\Projections'; } /** diff --git a/src/Commands/stubs/KeyedProjector.php.stub b/src/Commands/stubs/KeyedProjection.php.stub similarity index 74% rename from src/Commands/stubs/KeyedProjector.php.stub rename to src/Commands/stubs/KeyedProjection.php.stub index 18ca2fe..ba14a1a 100644 --- a/src/Commands/stubs/KeyedProjector.php.stub +++ b/src/Commands/stubs/KeyedProjection.php.stub @@ -3,13 +3,13 @@ namespace {{ namespace }}; use Illuminate\Database\Eloquent\Model; -use Laravelcargo\LaravelCargo\Models\Projection; -use Laravelcargo\LaravelCargo\Projector; +use TimothePearce\Quasar\Models\Projection; +use TimothePearce\Quasar\Contracts\ProjectionContract; -class {{ class }} extends Projector +class {{ class }} extends Projection implements ProjectionContract { /** - * Lists the time intervals used to compute the projections. + * Lists the available periods. * * @var string[] */ diff --git a/src/Commands/stubs/Projector.php.stub b/src/Commands/stubs/Projection.php.stub similarity index 68% rename from src/Commands/stubs/Projector.php.stub rename to src/Commands/stubs/Projection.php.stub index 54b0429..17124ad 100644 --- a/src/Commands/stubs/Projector.php.stub +++ b/src/Commands/stubs/Projection.php.stub @@ -3,13 +3,13 @@ namespace {{ namespace }}; use Illuminate\Database\Eloquent\Model; -use Laravelcargo\LaravelCargo\Models\Projection; -use Laravelcargo\LaravelCargo\Projector; +use TimothePearce\Quasar\Models\Projection; +use TimothePearce\Quasar\Contracts\ProjectionContract; -class {{ class }} extends Projector +class {{ class }} extends Projection implements ProjectionContract { /** - * Lists the time intervals used to compute the projections. + * Lists the available periods. * * @var string[] */ diff --git a/src/Contracts/ProjectorContract.php b/src/Contracts/ProjectionContract.php similarity index 59% rename from src/Contracts/ProjectorContract.php rename to src/Contracts/ProjectionContract.php index c354b63..50a2dd6 100644 --- a/src/Contracts/ProjectorContract.php +++ b/src/Contracts/ProjectionContract.php @@ -1,10 +1,10 @@ periods)->each(fn (string $period) => $this->parsePeriod($period)); + $periods = (new ReflectionProperty($this->projectionName, 'periods'))->getValue(); + + collect($periods)->each(fn (string $period) => $this->parsePeriod($period)); } /** @@ -54,12 +50,14 @@ private function parsePeriod(string $period): void */ private function findProjection(string $period, int $quantity, string $periodType): Projection | null { - return Projection::firstWhere([ - ['projector_name', $this::class], - ['key', $this->hasKey() ? $this->key($this->model) : null], + $query = Projection::where([ + ['projector_name', $this->projectionName], + ['key', $this->hasKey() ? $this->key() : null], ['period', $period], ['start_date', Carbon::now()->floorUnit($periodType, $quantity)], ]); + + return $query->first(); } /** @@ -67,12 +65,12 @@ private function findProjection(string $period, int $quantity, string $periodTyp */ private function createProjection(string $period, int $quantity, string $periodType): void { - $this->model->projections()->create([ - 'projector_name' => $this::class, - 'key' => $this->hasKey() ? $this->key($this->model) : null, + $this->projectedModel->projections()->create([ + 'projector_name' => $this->projectionName, + 'key' => $this->hasKey() ? $this->key() : null, 'period' => $period, 'start_date' => Carbon::now()->floorUnit($periodType, $quantity), - 'content' => $this->handle($this::defaultContent(), $this->model), + 'content' => $this->getProjectedContent($this->projectionName::defaultContent()), ]); } @@ -81,7 +79,7 @@ private function createProjection(string $period, int $quantity, string $periodT */ private function updateProjection(Projection $projection): void { - $projection->content = $this->handle($projection->content, $this->model); + $projection->content = $this->getProjectedContent($projection->content); $projection->save(); } @@ -91,6 +89,22 @@ private function updateProjection(Projection $projection): void */ private function hasKey(): bool { - return $this->key($this->model) !== false; + return method_exists($this->projectionName, 'key'); + } + + /** + * The key used to query the projection. + */ + public function key(): bool | int | string + { + return $this->projectionName::key($this->projectedModel); + } + + /** + * Get the projected content. + */ + private function getProjectedContent(array $baseContent): array + { + return $this->projectionName::handle($baseContent, $this->projectedModel); } } diff --git a/src/LaravelCargoServiceProvider.php b/src/QuasarServiceProvider.php similarity index 77% rename from src/LaravelCargoServiceProvider.php rename to src/QuasarServiceProvider.php index 0dd0185..1852dd2 100644 --- a/src/LaravelCargoServiceProvider.php +++ b/src/QuasarServiceProvider.php @@ -1,11 +1,11 @@ app->runningInConsole()) { $this->commands([ - CreateProjectorCommand::class, + CreateProjectionCommand::class, ]); } } diff --git a/src/WithProjections.php b/src/WithProjections.php index a12f01a..f1d363e 100644 --- a/src/WithProjections.php +++ b/src/WithProjections.php @@ -1,11 +1,12 @@ projectors)->each( - fn (string $projector) => - (new $projector($this))->parsePeriods() + collect($this->projections)->each( + fn (string $projection) => + (new Projector($this, $projection))->parsePeriods() ); } @@ -61,7 +63,7 @@ public function projections( } /** - * Get the first projection + * Get the first projection. */ public function firstProjection( string | null $projectorName = null, @@ -73,8 +75,8 @@ public function firstProjection( /** * Set the projectors. */ - public function setProjectors(array $projectors) + public function setProjections(array $projections) { - $this->projectors = $projectors; + $this->projections = $projections; } } diff --git a/testbench.yaml b/testbench.yaml index 0cab8d9..8bfe538 100644 --- a/testbench.yaml +++ b/testbench.yaml @@ -1,2 +1,2 @@ providers: - - Laravelcargo\LaravelCargo\LaravelCargoServiceProvider + - Laravelcargo\LaravelCargo\QuasarServiceProvider diff --git a/tests/Commands/CreateProjectionCommandTest.php b/tests/Commands/CreateProjectionCommandTest.php new file mode 100644 index 0000000..b4cb65f --- /dev/null +++ b/tests/Commands/CreateProjectionCommandTest.php @@ -0,0 +1,155 @@ +assertMissingFile($projectionClass); + + $this->createProjectionFile($projectionClass); + + $this->assertProjectorFileContent($projectionClass); + } + + /** @test */ + public function it_creates_a_new_projector_with_key_file() + { + $projectionClass = app_path('Models/Projections/ProjectionClass.php'); + + $this->assertMissingFile($projectionClass); + + $this->createKeyedProjectionFile($projectionClass); + + $this->assertKeyedProjectionFileContent($projectionClass); + } + + private function assertMissingFile(string $projectionClass) + { + if (File::exists($projectionClass)) { + unlink($projectionClass); + } + + $this->assertFalse(File::exists($projectionClass)); + } + + private function createProjectionFile(string $projectionClass) + { + Artisan::call('make:projection ProjectionClass'); + + $this->assertTrue(File::exists($projectionClass)); + } + + private function createKeyedProjectionFile(string $projectorClass) + { + Artisan::call('make:projection ProjectionClass --key'); + + $this->assertTrue(File::exists($projectorClass)); + } + + private function assertProjectorFileContent(string $projectorClass) + { + + // Assert the file contains the right contents + $expectedContents = <<assertEquals($expectedContents, file_get_contents($projectorClass)); + } + + private function assertKeyedProjectionFileContent(string $projectorClass) + { + + // Assert the file contains the right contents + $expectedContents = <<id; + } + + /** + * Compute the projection. + */ + public function handle(Projection \$projection, Model \$model): array + { + return []; + } +} + +CLASS; + + $this->assertEquals($expectedContents, file_get_contents($projectorClass)); + } +} diff --git a/tests/Commands/CreateProjectorCommandTest.php b/tests/Commands/CreateProjectorCommandTest.php deleted file mode 100644 index 4f9c35c..0000000 --- a/tests/Commands/CreateProjectorCommandTest.php +++ /dev/null @@ -1,154 +0,0 @@ -assertMissingFile($projectorClass); - - $this->createProjectorFile($projectorClass); - - $this->assertProjectorFileContent($projectorClass); - } - - /** @test */ - public function it_creates_a_new_projector_with_key_file() - { - $projectorClass = app_path('Projectors/ProjectorClass.php'); - - $this->assertMissingFile($projectorClass); - - $this->createKeyedProjectorFile($projectorClass); - - $this->assertKeyedProjectorFileContent($projectorClass); - } - - private function assertMissingFile(string $projectorClass) - { - if (File::exists($projectorClass)) { - unlink($projectorClass); - } - - $this->assertFalse(File::exists($projectorClass)); - } - - private function createProjectorFile(string $projectorClass) - { - Artisan::call('make:projector ProjectorClass'); - - $this->assertTrue(File::exists($projectorClass)); - } - - private function createKeyedProjectorFile(string $projectorClass) - { - Artisan::call('make:projector ProjectorClass --key'); - - $this->assertTrue(File::exists($projectorClass)); - } - - private function assertProjectorFileContent(string $projectorClass) - { - - // Assert the file contains the right contents - $expectedContents = <<assertEquals($expectedContents, file_get_contents($projectorClass)); - } - - private function assertKeyedProjectorFileContent(string $projectorClass) - { - - // Assert the file contains the right contents - $expectedContents = <<id; - } - - /** - * Compute the projection. - */ - public function handle(Projection \$projection, Model \$model): array - { - return []; - } -} - -CLASS; - - $this->assertEquals($expectedContents, file_get_contents($projectorClass)); - } -} diff --git a/tests/Models/Log.php b/tests/Models/Log.php index 053a42e..0699904 100644 --- a/tests/Models/Log.php +++ b/tests/Models/Log.php @@ -1,11 +1,11 @@ expectException(MultipleProjectorsException::class); - $this->createModelWithProjectors(Log::class, [SinglePeriodProjector::class, MultiplePeriodsProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjector::class, MultiplePeriodsProjector::class]); /** @var ProjectionCollection $collection */ $collection = Projection::all(); @@ -125,7 +125,7 @@ public function it_raises_an_exception_when_a_multiple_periods_collection_is_fil { $this->expectException(MultiplePeriodsException::class); - $this->createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); /** @var ProjectionCollection $collection */ $collection = Projection::all(); diff --git a/tests/ProjectionTest.php b/tests/ProjectionTest.php index 4e5484d..7768515 100644 --- a/tests/ProjectionTest.php +++ b/tests/ProjectionTest.php @@ -1,16 +1,16 @@ createModelWithProjectors(Log::class, [SinglePeriodProjector::class]); - $this->createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjector::class]); + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); $numberOfProjections = Projection::fromProjector(SinglePeriodProjector::class)->count(); @@ -56,10 +56,10 @@ public function it_get_the_projections_from_projector_name() /** @test */ public function it_get_the_projections_from_a_single_period() { - $this->createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); // 1 - $this->createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); // 1 + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); // 1 + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); // 1 $this->travel(6)->minutes(); - $this->createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); // 2 + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); // 2 $numberOfProjections = Projection::period('5 minutes')->count(); @@ -146,8 +146,8 @@ public function it_does_not_include_a_projection_with_a_start_date_equals_to_the /** @test */ public function it_get_the_projection_from_a_single_key() { - $log = $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); - $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $log = $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); $numberOfProjections = Projection::key($log->id)->count(); @@ -157,8 +157,8 @@ public function it_get_the_projection_from_a_single_key() /** @test */ public function it_get_the_projections_from_multiples_keys() { - $log = $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); - $anotherLog = $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $log = $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $anotherLog = $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); $numberOfProjections = Projection::key([$log->id, $anotherLog->id])->count(); diff --git a/tests/Projectors/MultiplePeriodsProjector.php b/tests/Projectors/MultiplePeriodsProjector.php index ba92ae9..59a3bd9 100644 --- a/tests/Projectors/MultiplePeriodsProjector.php +++ b/tests/Projectors/MultiplePeriodsProjector.php @@ -1,16 +1,17 @@ $content['number of logs'] + 1, diff --git a/tests/Projectors/SinglePeriodKeyedProjector.php b/tests/Projectors/SinglePeriodKeyedProjector.php index 75a9f07..101e5d4 100644 --- a/tests/Projectors/SinglePeriodKeyedProjector.php +++ b/tests/Projectors/SinglePeriodKeyedProjector.php @@ -1,16 +1,17 @@ $content['number of logs'] + 1, diff --git a/tests/Projectors/SinglePeriodProjector.php b/tests/Projectors/SinglePeriodProjector.php index 01dd9ee..e73a4bc 100644 --- a/tests/Projectors/SinglePeriodProjector.php +++ b/tests/Projectors/SinglePeriodProjector.php @@ -1,16 +1,17 @@ $content['number of logs'] + 1, diff --git a/tests/Projectors/SinglePeriodProjectorWithUniqueKey.php b/tests/Projectors/SinglePeriodProjectorWithUniqueKey.php index f2671fd..5203ce7 100644 --- a/tests/Projectors/SinglePeriodProjectorWithUniqueKey.php +++ b/tests/Projectors/SinglePeriodProjectorWithUniqueKey.php @@ -1,16 +1,17 @@ id; } @@ -33,7 +34,7 @@ public function key(Model $model): string /** * Compute the projection. */ - public function handle(array $content, Model $model): array + public static function handle(array $content, Model $model): array { return [ 'number of logs' => $content['number of logs'] + 1, diff --git a/tests/TestCase.php b/tests/TestCase.php index 6c7b55f..e0116f5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,10 +1,11 @@ 'Laravelcargo\\LaravelCargo\\Tests\\Database\\Factories\\'.class_basename($modelName).'Factory' + fn (string $modelName) => 'TimothePearce\\Quasar\\Tests\\Database\\Factories\\'.class_basename($modelName).'Factory' ); } protected function getPackageProviders($app) { return [ - LaravelCargoServiceProvider::class, + QuasarServiceProvider::class, ]; } /** * Define environment setup. * - * @param \Illuminate\Foundation\Application $app + * @param Application $app * @return void */ protected function defineEnvironment($app) diff --git a/tests/WithProjectableFactory.php b/tests/WithProjectableFactory.php index db00b50..55ef8e5 100644 --- a/tests/WithProjectableFactory.php +++ b/tests/WithProjectableFactory.php @@ -1,6 +1,6 @@ make(); - $model->setProjectors($projectors); + $model->setProjections($projections); $model->save(); return $model; diff --git a/tests/WithProjectionTest.php b/tests/WithProjectionTest.php index 334e21e..8e27084 100644 --- a/tests/WithProjectionTest.php +++ b/tests/WithProjectionTest.php @@ -1,17 +1,17 @@ createModelWithProjectors(Log::class, [MultiplePeriodsProjector::class]); + $this->createModelWithProjections(Log::class, [MultiplePeriodsProjector::class]); $this->assertDatabaseCount('cargo_projections', 8); } @@ -98,7 +98,7 @@ public function it_has_a_relationship_with_the_projection() /** @test */ public function it_get_the_projections_from_a_single_type() { - $log = $this->createModelWithProjectors(Log::class, [ + $log = $this->createModelWithProjections(Log::class, [ SinglePeriodProjector::class, MultiplePeriodsProjector::class, ]); @@ -113,7 +113,7 @@ public function it_get_the_projections_from_a_single_type() /** @test */ public function it_get_the_projections_from_a_single_type_and_period() { - $log = $this->createModelWithProjectors(Log::class, [ + $log = $this->createModelWithProjections(Log::class, [ SinglePeriodProjector::class, MultiplePeriodsProjector::class, ]); @@ -127,7 +127,7 @@ public function it_get_the_projections_from_a_single_type_and_period() /** @test */ public function it_get_the_projections_from_a_single_type_and_multiple_periods() { - $log = $this->createModelWithProjectors(Log::class, [ + $log = $this->createModelWithProjections(Log::class, [ SinglePeriodProjector::class, MultiplePeriodsProjector::class, ]); @@ -143,8 +143,8 @@ public function it_get_the_projections_from_a_single_type_and_multiple_periods() /** @test */ public function it_creates_a_single_projection_for_models_with_the_same_projection() { - $this->createModelWithProjectors(Log::class, [SinglePeriodProjector::class]); - $this->createModelWithProjectors(Message::class, [SinglePeriodProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjector::class]); + $this->createModelWithProjections(Message::class, [SinglePeriodProjector::class]); $this->assertEquals(1, Projection::count()); } @@ -152,10 +152,10 @@ public function it_creates_a_single_projection_for_models_with_the_same_projecti /** @test */ public function it_updates_a_projection_for_a_single_projectable_type_and_interval() { - $log = $this->createModelWithProjectors(Log::class, [SinglePeriodProjector::class]); - $message = $this->createModelWithProjectors(Message::class, [MultiplePeriodsProjector::class]); + $log = $this->createModelWithProjections(Log::class, [SinglePeriodProjector::class]); + $message = $this->createModelWithProjections(Message::class, [MultiplePeriodsProjector::class]); - $this->createModelWithProjectors(Log::class, [SinglePeriodProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjector::class]); $logProjection = $log->projections(SinglePeriodProjector::class, '5 minutes')->first(); $messageProjection = $message->projections(MultiplePeriodsProjector::class, '5 minutes')->first(); @@ -167,8 +167,8 @@ public function it_updates_a_projection_for_a_single_projectable_type_and_interv /** @test */ public function it_creates_a_projection_for_each_different_key() { - $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); - $this->createModelWithProjectors(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodProjectorWithUniqueKey::class]); $this->assertEquals(2, Projection::count()); } @@ -176,8 +176,8 @@ public function it_creates_a_projection_for_each_different_key() /** @test */ public function it_creates_a_single_projection_for_a_similar_key() { - $this->createModelWithProjectors(Log::class, [SinglePeriodKeyedProjector::class]); - $this->createModelWithProjectors(Log::class, [SinglePeriodKeyedProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodKeyedProjector::class]); + $this->createModelWithProjections(Log::class, [SinglePeriodKeyedProjector::class]); $this->assertEquals(1, Projection::count()); } diff --git a/tests/database/factories/LogFactory.php b/tests/database/factories/LogFactory.php index dc6073c..5ca90e2 100644 --- a/tests/database/factories/LogFactory.php +++ b/tests/database/factories/LogFactory.php @@ -1,9 +1,9 @@