Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

abalsh / Garlix

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit bda474aa authored 6 years ago by Florian Shllaku's avatar Florian Shllaku
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

Newsletter validation

parent bb696f31 master … laravel
Show whitespace changes
Inline Side-by-side
Showing with 14 additions and 0 deletions
  • app/Http/Controllers/NewsLetterController.php
  • resources/views/subscribe.blade.php
app/Http/Controllers/NewsLetterController.php
View file @ bda474aa
......@@ -14,6 +14,9 @@ class NewsletterController extends Controller
public function store(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
]);
if ( ! Newsletter::isSubscribed($request->email) )
{
Newsletter::subscribePending($request->email);
......
This diff is collapsed. Click to expand it.
resources/views/subscribe.blade.php
View file @ bda474aa
......@@ -49,8 +49,19 @@
@endif
<h2 class="title">Subscribe to our newsletter!</h2>
<br>
@if(count($errors) > 0)
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<p class="paragraph">Subscribe to our Newsletter to get more information about fiat and crypto currencies. By subscribing to us, you will be receiving everyday five main news article stories to get updated on what is going on in the currency world.</p>
<br>
<form action={{url('/subscribe')}} method="post">
@csrf
<div class="input-group">
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment