Laravel Email Contact
Laravel Email Contact
Email Config
Config
Email Send Validate
Router
View
Origin Post Way
Bower / Gulp Integrate
Controller
Request - Validate input
Session - Success Alert
AJAX
Submit 500 Bug
JSON Response
1. Email Config
.env & config/email
php artisan tinker (Test Validate)
Mail::send("emailtemplate", ["name" => "robin"], function($message) { $message->to("xlcoder166@gmail.com") ->subject("Say Hello Laravel"); });
2. Router
Add get Index Show
Add post mail send
Route::get('/', "ContactContoller@index" ); Route::post("/", "ContactContoller@sendMail");
3. view
Pass Variable Blade
Error Usage
Session Usage
Bower / Glup
Bower - bower_vendor in public
glup use origin glup package.json and gulp plug
@if (count($errors) > 0) <div class="alert alert-danger"> <strong>Whoops!</strong> There were some problems with your input.<br><br> <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> </div> @endif
Hmtl Form Post/Get Mothed
4. Controller
Add Email Function & Validate Request
Illuminate\Support\Facades\Mail - config/App
Reuest
function rule validate rule
custom error message
5. AJAX
Right Submit & Fix 500 bug
<meta name="csrf-token" content="{{ csrf_token() }}"> $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
Controller Use
Illuminate\Support\Facades\Response;
return json responsereturn Response::json(["status" => "success"]);
Just wanted to ask if you would be interested in getting external help with graphic design? We do all design work like
banners, advertisements, brochures, logos, flyers, etc. for a fixed monthly fee.
We don't charge for each task. What kind of work do you need on a regular basis? Let me know and I'll share my portfolio
with you.
Get thousands of clicks per month from Google, Bing and other search engines from as low as $299 per month.
No SEO and no PPC.
Flat fee per keyword.
Send list of desired keywords and I'll send you traffic quote and details within 24 hours.
You can also visit our website and see online demonstration.