Skip to content

Commit

Permalink
Fixed issue with boot method
Browse files Browse the repository at this point in the history
  • Loading branch information
sinemacula-ben committed Apr 17, 2024
1 parent b5fdb4e commit 6da6007
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ composer require sinemacula/laravel-repositories
After installation, publish the package configuration to customize it according to your needs:

```bash
php artisan vendor:publish --provider="SineMacula\RepositoryServiceProvider"
php artisan vendor:publish --provider="SineMacula\Repositories\RepositoryServiceProvider"
```

This command publishes the package configuration file to your application's config directory.
Expand Down
24 changes: 12 additions & 12 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct(
* Trigger a static method call on the repository.
*
* @param string $method
* @param array $arguments
* @param array $arguments
* @return mixed
*/
public static function __callStatic(string $method, array $arguments): mixed
Expand All @@ -70,7 +70,7 @@ public static function __callStatic(string $method, array $arguments): mixed
* Forward method calls to the model
*
* @param string $method
* @param array $arguments
* @param array $arguments
* @return mixed
*/
public function __call(string $method, array $arguments): mixed
Expand All @@ -83,16 +83,6 @@ public function __call(string $method, array $arguments): mixed
return $this->resetAndReturn($result);
}

/**
* Boot the repository instance.
*
* This is a useful method for setting immediate properties when extending
* the base repository class.
*
* @return void
*/
public function boot(): void {}

/**
* Return the model class
*
Expand Down Expand Up @@ -324,6 +314,16 @@ public function resetScopes(): static
return $this;
}

/**
* Boot the repository instance.
*
* This is a useful method for setting immediate properties when extending
* the base repository class.
*
* @return void
*/
protected function boot(): void {}

/**
* Apply the criteria to the current query.
*
Expand Down

0 comments on commit 6da6007

Please sign in to comment.