1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update ContactController

This commit is contained in:
Daniel Supernault 2019-06-18 18:49:24 -06:00
parent 1bb3e0344b
commit 8430a8419a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -5,11 +5,13 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\Contact;
use App\Jobs\ContactPipeline\ContactPipeline;
class ContactController extends Controller
{
public function show(Request $request)
{
abort_if(!config('instance.email') && !config('instance.contact.enabled'), 404);
return view('site.contact');
}
@ -42,6 +44,8 @@ class ContactController extends Controller
$contact->message = $message;
$contact->save();
ContactPipeline::dispatchNow($contact);
return redirect()->back()->with('status', 'Success - Your message has been sent to admins.');
}
}