Skip to content

Commit

Permalink
Don't assume facade alias
Browse files Browse the repository at this point in the history
  • Loading branch information
musonza committed Jun 16, 2019
1 parent 118ddc3 commit 600093b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Http/Requests/CreateFormSubmissionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Musonza\Form\Http\Requests;

use Form;
use Musonza\Form\Form;
use Illuminate\Foundation\Http\FormRequest;
use Musonza\Form\Rules\ReCaptcha;

Expand All @@ -25,9 +25,12 @@ public function authorize()
*/
public function rules()
{
/** @var $form Form */
$form = app(Form::class);

return [
'g-recaptcha-response' => [
Form::googleRecaptchaEnabled() ? 'required' : '',
$form->googleRecaptchaEnabled() ? 'required' : '',
new ReCaptcha,
],
];
Expand Down

0 comments on commit 600093b

Please sign in to comment.