mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
30 lines
586 B
PHP
30 lines
586 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Auth;
|
||
|
|
||
|
class ContactController extends Controller
|
||
|
{
|
||
|
public function show(Request $request)
|
||
|
{
|
||
|
return view('site.contact');
|
||
|
}
|
||
|
|
||
|
public function store(Request $request)
|
||
|
{
|
||
|
abort_if(!Auth::check(), 403);
|
||
|
|
||
|
$this->validate($request, [
|
||
|
'message' => 'required|string|min:5|max:500',
|
||
|
'request_response' => 'string|max:3'
|
||
|
]);
|
||
|
|
||
|
$message = $request->input('message');
|
||
|
$request_response = $request->input('request_response') == 'on' ? true : false;
|
||
|
$user = Auth::user();
|
||
|
return $request->all();
|
||
|
}
|
||
|
}
|