Created
July 21, 2015 15:12
-
-
Save jasonherndon/5ed856ad26c370ad402e to your computer and use it in GitHub Desktop.
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
<?php namespace Laracove\Http\Controllers; | |
use Laracove\Services\Utility\SendMail; | |
use Laracove\Http\Controllers\Controller; | |
use Exception; | |
class AnyController extends Controller { | |
/** | |
* Form request from /edit | |
* | |
* @return response | |
*/ | |
public function doSomething(SendMail $sendMail) | |
{ | |
try { | |
// Send the update to the author | |
$sendMail->sendMail([ | |
'subject' => '', | |
'template' => 'emails.submission_rejected', | |
'recipient_name' => '', | |
'recipient_email' => '', | |
]); | |
} catch (Exception $e) { | |
// do something else, return them | |
return redirect()->back(); | |
} | |
// do something | |
return redirect()->back(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment