jeg er ikke sikker på hvad der der sket :)

This commit is contained in:
Neerholt 2020-06-29 10:07:42 +02:00
parent 6bdf7d3447
commit 3115b337cd
3 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Contact;
class ContactController extends Controller class ContactController extends Controller
{ {
@ -11,9 +13,12 @@ class ContactController extends Controller
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function index() public function index(Request $request)
{ {
//
$contact = Contact::query()->paginate($request->input("limit", 20));
return Response::detect("contact.index", [ "contact" => $contact]);
} }
/** /**

View File

@ -32,7 +32,7 @@
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri"> <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">
Galleri Galleri
</a> </a>
<a href="#"> <a href="{{ route("contacts.index") }}">
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret"> <img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
Kontoret Kontoret
</a> </a>

View File

@ -26,7 +26,7 @@ Route::get("/logout", "UserController@logout")->name("users.logout");
Route::resource("contacts", "ContactController");
Route::resource("menu-plans", "MenuPlanController"); Route::resource("menu-plans", "MenuPlanController");
Route::resource("users", "UserController"); Route::resource("users", "UserController");
Route::resource("events", "EventController"); Route::resource("events", "EventController");