We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e0914a commit 3d657e1Copy full SHA for 3d657e1
src/Efficiently/JqueryLaravel/helpers.php
@@ -260,7 +260,16 @@ function button_to($name, array $options = [])
260
}
261
$formOptions = array_merge($formOptions, array_pull($options, 'form', []));
262
263
- return Form::open($formOptions).'<div>'.Form::submit($name, $options).'</div>'.Form::close();
+ $submitButton = Form::submit($name, $options);
264
+ if (
265
+ class_exists('Button') &&
266
+ is_a(new Button, '\Illuminate\Support\Facades\Facade') &&
267
+ method_exists(Button::getFacadeRoot(), 'withValue')
268
+ ) {
269
+ $submitButton = Button::withValue($name)->withAttributes($options)->submit();
270
+ }
271
+
272
+ return Form::open($formOptions).'<div>'.$submitButton.'</div>'.Form::close();
273
274
275
0 commit comments