From aaa629a3853aa7ca5091b7a416bc88d87c9387cb Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 7 May 2022 13:48:51 +0200 Subject: [PATCH] add utils --- docs/utils/file_attribute.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/utils/file_attribute.md b/docs/utils/file_attribute.md index 3f62285..63a3c33 100644 --- a/docs/utils/file_attribute.md +++ b/docs/utils/file_attribute.md @@ -10,12 +10,13 @@ use App\Foo\Bar; $path = 'path/to/file'; $file = FileAttribute::handleFile($path); // returns an instance of File +$path = 'path/to/file'; +$file = FileAttribute::handleFile($path, Bar::class); // returns an instance of Bar + $path = 'path/to/removed_file'; $file = FileAttribute::handleFile($path); // returns null $path = null; $file = FileAttribute::handleFile($path); // returns null -$path = 'path/to/file'; -$file = FileAttribute::handleFile($path, Bar::class); // returns an instance of Bar ```