mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 16:24:29 +00:00
Update ContactController
This commit is contained in:
parent
1bb3e0344b
commit
8430a8419a
1 changed files with 4 additions and 0 deletions
|
@ -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.');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue