Skip to content

Commit 7f20138

Browse files
committed
Changed relationship name to plural form
1 parent b1fccc8 commit 7f20138

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Attachment/Attachable.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,28 @@
1414
trait Attachable
1515
{
1616
/**
17+
* @deprecated Use the `attachment` method instead.
18+
* This method will be removed in the next major release.
19+
*
1720
* Get all the attachments associated with the given model.
1821
*
1922
* @param string|null $group
2023
*
2124
* @return MorphToMany
2225
*/
2326
public function attachment(?string $group = null): MorphToMany
27+
{
28+
return $this->attachments($group);
29+
}
30+
31+
/**
32+
* Get all the attachments associated with the given model.
33+
*
34+
* @param string|null $group
35+
*
36+
* @return MorphToMany
37+
*/
38+
public function attachments(?string $group = null): MorphToMany
2439
{
2540
return $this->morphToMany(
2641
Dashboard::model(Attachment::class),

0 commit comments

Comments
 (0)