diff --git a/src/Http/Controllers/NewslettersController.php b/src/Http/Controllers/NewslettersController.php index f415414..2c6daea 100644 --- a/src/Http/Controllers/NewslettersController.php +++ b/src/Http/Controllers/NewslettersController.php @@ -6,7 +6,7 @@ use Illuminate\Http\Request; use Caffeinated\Flash\Facades\Flash; use Mixdinternet\Newsletters\Services\NewslettersServices; -use Icecreamy\Frontend\Http\Requests\NewslettersRequest; +use Mixdinternet\Newsletters\Http\Requests\NewslettersRequest; use App\Http\Controllers\Controller; use Carbon; use Auth; diff --git a/src/Http/Requests/NewslettersRequest.php b/src/Http/Requests/NewslettersRequest.php new file mode 100644 index 0000000..27c3dad --- /dev/null +++ b/src/Http/Requests/NewslettersRequest.php @@ -0,0 +1,30 @@ + 'required' + , 'email' => 'required|email' + ]; + } + + if (config('mnewsletters.fields.name') == false){ + return [ + 'email' => 'required|email' + ]; + } + } + + public function authorize() + { + return true; + } + +} \ No newline at end of file