This commit is contained in:
2025-05-03 20:09:18 +05:00
parent 3775558899
commit 951bc684f7
22 changed files with 2250 additions and 1846 deletions

View File

@@ -2,9 +2,27 @@
namespace App\Http\Controllers;
use App\Models\ContactUs;
use Illuminate\Http\Request;
class ContactPageController extends Controller
{
//
public function index() {}
public function store(Request $request)
{
$data = $request->validate([
'name' => ['required', 'string', 'max:255'],
'phone' => ['required', 'numeric'],
'company_name' => ['nullable', 'string', 'max:255'],
'email' => ['nullable', 'string', 'email', 'max:255'],
'message' => ['required', 'string'],
]);
ContactUs::create($data);
return back()
->with('message', 'Habarlaşanyňyz üçin sag boluň! Gysga wagtda siziň bilen habarlaşarys.')
->withFragment('#contact-us-form');
}
}