diff options
author | Mateja <mail@matejamaric.com> | 2020-10-25 22:18:23 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-10-25 22:18:23 +0100 |
commit | dda8fb2a05de804f2b37245fde2580a9d18cc51b (patch) | |
tree | 032bbd11439aded239488b88a34944b0d7384e1a /app/Http/Controllers | |
parent | 4b92a7928ec6634dff4ca066af0a43ad1cfb3c46 (diff) | |
download | yota-laravel-dda8fb2a05de804f2b37245fde2580a9d18cc51b.tar.gz yota-laravel-dda8fb2a05de804f2b37245fde2580a9d18cc51b.zip |
Form validation, blade, bootstrap
Diffstat (limited to 'app/Http/Controllers')
-rw-r--r-- | app/Http/Controllers/PagesController.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index fcdfba9..1e0866f 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -52,6 +52,38 @@ class PagesController extends Controller public function reserveForm(Request $request) { //dd($request->input('modes')); + + $validatedData = $request->validate([ + 'scall' => 'required|alphanum', + 'sdate' => 'required|date', + 'stime' => 'required', + 'edate' => 'required|date', + 'etime' => 'required', + 'freqs' => 'required', + 'modes' => 'required', + 'ocall' => 'required|alphanum', + 'oname' => 'required', + 'email' => 'required|email', + 'phone' => ['required', 'regex:/^[0-9 ]+$/'], + ]); + +/* + $table->id(); + $table->boolean('approved')->default(false); + $table->unsignedBigInteger('specialCall'); + $table->dateTime('fromTime'); + $table->dateTime('toTime'); + $table->string('frequencies', 255); + $table->string('modes', 255); + $table->string('operatorCall'); + $table->string('operatorName'); + $table->string('operatorEmail'); + $table->string('operatorPhone', 50); + $table->integer('qso')->default(0); + $table->timestamps(); + $table->foreign('specialCall')->references('id')->on('special_calls'); +*/ + return redirect('reserve')->with('status', 'Reservation submitted.'); } |