This commit is contained in:
Sebastian Davaris 2020-06-30 08:49:51 +02:00
commit a91118a2b3
9 changed files with 73 additions and 10 deletions

10
skolehjem/app/Album.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Album extends Model
{
//
}

View File

@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class Feedbacks extends Model
{
//
protected $fillable = [
'message', "suggestion_form"
];
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AlbumController extends Controller
{
//
}

View File

@ -41,14 +41,14 @@ class FeedbackController extends Controller
public function store(Request $request)
{
$requestBody = $request->validate([
"name" => "required|max:255",
"link" => "required|max:255"
"message" => "required",
"suggestion_form" => "required|max:255"
]);
$feedback = new Feedbacks($requestBody);
$feedback->save();
$feedbacks = new Feedbacks($requestBody);
$feedbacks->save();
return Response::detect("feedback.store");
return Response::detect("root.index");
}
/**

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ImageController extends Controller
{
//
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class VideoController extends Controller
{
//
}

10
skolehjem/app/Image.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
//
}

10
skolehjem/app/Video.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Video extends Model
{
//
}

View File

@ -6,14 +6,15 @@
@section("content")
<main class="h-100 text-center">
<form action="" method="post" required>
<form action="{{ action('FeedbackController@store') }}" method="post">
@csrf
<span>Ris el. Ros?</span>
<select name="choose_suggestion" class="mb-2">
<select name="suggestion_form" class="mb-2" required>
<option>Ros</option>
<option>Ris</option>
</select>
<textarea name="feedback_message" placeholder="Skriv Ris/Ros besked her" required></textarea>
<button class="btn btn-sde-blue mt-2" onclick="window.location = '';">Send Ris/Ros</button>
<textarea name="message" placeholder="Skriv Ris/Ros besked her" required></textarea>
<button type="submit" class="btn btn-sde-blue mt-2">Send Ris/Ros</button>
</form>
</main>
@endsection