Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
This commit is contained in:
commit
626dddbb06
|
@ -4,7 +4,7 @@ namespace App;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Feedback extends Model
|
||||
class Feedbacks extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -72,8 +72,8 @@ class ContactController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$contacts = Contact::find($id);
|
||||
return Response::detect("contacts.edit", ["contact" => $contacts]);
|
||||
$contact = Contact::find($id);
|
||||
return Response::detect("contacts.edit", ["contact" => $contact]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Feedback;
|
||||
use App\Feedbacks;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
|
@ -17,9 +17,9 @@ class FeedbackController extends Controller
|
|||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$feedback = Feedback::query()->paginate($request->input("limit", 20));
|
||||
$feedback = Feedbacks::query()->paginate($request->input("limit", 20));
|
||||
|
||||
return Response::detect("feedback.index", [ "feedback" => $feedback ]);
|
||||
return Response::detect("feedbacks.index", [ "feedback" => $feedback ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class FeedbackController extends Controller
|
|||
"link" => "required|max:255"
|
||||
]);
|
||||
|
||||
$feedback = new Feedback($requestBody);
|
||||
$feedback = new Feedbacks($requestBody);
|
||||
$feedback->save();
|
||||
|
||||
return Response::detect("feedback.store");
|
||||
|
@ -70,7 +70,7 @@ class FeedbackController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$feedback = Feedback::find($id);
|
||||
$feedback = Feedbacks::find($id);
|
||||
|
||||
return Response::detect("feedbacks.edit", [
|
||||
"feedback" => $feedback
|
||||
|
@ -90,7 +90,7 @@ class FeedbackController extends Controller
|
|||
"time" => "required"
|
||||
]);
|
||||
|
||||
$feedback = Feedback::find($id);
|
||||
$feedback = Feedbacks::find($id);
|
||||
|
||||
$feedback->update($data);
|
||||
|
||||
|
@ -109,7 +109,7 @@ class FeedbackController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$feedback = Feedback::find($id);
|
||||
$feedback = Feedbacks::find($id);
|
||||
$feedback->delete();
|
||||
|
||||
return Response::detect("feedbacks.destroy");
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Feedback - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('feedbacks.index') }}" class="text-white">Vis Feedback</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Feedback Besked</th>
|
||||
<th>Ris el. Ros</th>
|
||||
</tr>
|
||||
@foreach($feedback as $fb)
|
||||
<tr>
|
||||
<td>{{ $fb->message }}</td>
|
||||
<td>{{ $fb->suggestion_form }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{{ $feedback->links() }}
|
||||
@endsection
|
|
@ -67,6 +67,12 @@
|
|||
<a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Feedback</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route('feedbacks.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-85" style="background-color: #cccccc;">
|
||||
<div class="directorypath text-white">
|
||||
|
|
Loading…
Reference in New Issue