Skip to content

Commit

Permalink
Use Laravel's resource_path instead of __DIR__ (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Humni authored Jan 9, 2025
1 parent ba66be5 commit 8afd05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/collections/extending-docs/fieldtypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class CustomFieldtype extends Fieldtype
// or
function icon()
{
return file_get_contents(__DIR__ . 'resources/svg/left_shark.svg');
return file_get_contents(resource_path('svg/left_shark.svg'));
}
}
```
Expand Down

0 comments on commit 8afd05f

Please # to comment.