Skip to content

Commit c97e48a

Browse files
committed
fix: minor
1 parent faa65a1 commit c97e48a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ CKEditor::make('Label')
2828
## Attachments
2929

3030
```php
31-
CKEditor::make('Label')->attachmentRoute(route('your-attachment-route'))
31+
CKEditor::make('Label')->attachmentEndpoint(route('your-attachment-route'))
3232
```
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-moonshine::form.textarea
22
::id="$id('ckeditor')"
3-
x-data="ckeditor(`{{ $attachmentRoute }}`)"
3+
x-data="ckeditor(`{{ $attachmentEndpoint }}`)"
44
:attributes="$attributes"
55
>{!! $value ?? '' !!}</x-moonshine::form.textarea>

src/Fields/CKEditor.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class CKEditor extends Textarea
1212
{
1313
protected string $view = 'moonshine-ckeditor::fields.ckeditor';
1414

15-
protected string $attachmentRoute = '';
15+
protected string $attachmentEndpoint = '';
1616

1717
public function getAssets(): array
1818
{
@@ -23,17 +23,17 @@ public function getAssets(): array
2323
];
2424
}
2525

26-
public function attachmentRoute(string $route): self
26+
public function attachmentEndpoint(string $value): self
2727
{
28-
$this->attachmentRoute = $route;
28+
$this->attachmentEndpoint = $value;
2929

3030
return $this;
3131
}
3232

3333
protected function viewData(): array
3434
{
3535
return [
36-
'attachmentRoute' => $this->attachmentRoute
36+
'attachmentEndpoint' => $this->attachmentEndpoint
3737
];
3838
}
3939
}

0 commit comments

Comments
 (0)