Created
March 19, 2022 09:56
-
-
Save ManiruzzamanAkash/842b6becae6ce3262f2d868837dad79e to your computer and use it in GitHub Desktop.
SMS Portal With Twilio and Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>SMS Portal With Twilio</title> | |
<!-- Styles --> | |
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="jumbotron"> | |
@if (session('success')) | |
<div class="alert alert-success"> | |
{{ session('success') }} | |
</div> | |
@endif | |
@if ($errors->any()) | |
<div class="alert alert-danger"> | |
<ul> | |
@foreach ($errors->all() as $error) | |
<li>{{ $error }}</li> | |
@endforeach | |
</ul> | |
</div> | |
@endif | |
<div class="row"> | |
<div class="col"> | |
<div class="card"> | |
<div class="card-header"> | |
Add Phone Number | |
</div> | |
<div class="card-body"> | |
<form method="POST"> | |
@csrf | |
<div class="form-group"> | |
<label>Enter Phone Number</label> | |
<input type="tel" class="form-control" name="phone_number" | |
placeholder="Enter Phone Number"> | |
</div> | |
<button type="submit" class="btn btn-primary">Register User</button> | |
</form> | |
</div> | |
</div> | |
</div> | |
<div class="col"> | |
<div class="card"> | |
<div class="card-header"> | |
Send SMS message | |
</div> | |
<div class="card-body"> | |
<form method="POST" action="/custom"> | |
@csrf | |
<div class="form-group"> | |
<label>Select users to notify</label> | |
<select name="users[]" multiple class="form-control"> | |
@foreach ($users as $user) | |
<option>{{ $user->phone_number }}</option> | |
@endforeach | |
</select> | |
</div> | |
<div class="form-group"> | |
<label>Notification Message</label> | |
<textarea name="body" class="form-control" rows="3"></textarea> | |
</div> | |
<button type="submit" class="btn btn-primary">Send Notification</button> | |
</form> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment