Skip to content

Commit 67229b3

Browse files
authored
Merge pull request #829 from hydephp/update-ValidatesExistence-trait
Refactor and update the ValidatesExistence trait
2 parents 13f58e8 + 8746be4 commit 67229b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/framework/src/Framework/Concerns/ValidatesExistence.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ trait ValidatesExistence
1919
*
2020
* @throws FileNotFoundException If the file does not exist.
2121
*/
22-
public function validateExistence(string $model, string $slug): void
22+
public static function validateExistence(string $model, string $identifier): void
2323
{
2424
/** @var \Hyde\Pages\Concerns\HydePage $model */
25-
$filepath = $model::sourcePath($slug);
25+
$filepath = $model::sourcePath($identifier);
2626

2727
if (! file_exists(Hyde::path($filepath))) {
2828
throw new FileNotFoundException($filepath);

0 commit comments

Comments
 (0)