Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
This commit is contained in:
commit
a91118a2b3
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Album extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class Feedbacks extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'message', "suggestion_form"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AlbumController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ImageController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class VideoController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Image extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Video extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue