| 2 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
use Illuminate\Support\Facades\Route;
|
|
|
4 |
|
|
|
5 |
/*
|
|
|
6 |
|--------------------------------------------------------------------------
|
|
|
7 |
| Web Routes
|
|
|
8 |
|--------------------------------------------------------------------------
|
|
|
9 |
|
|
|
|
10 |
| Here is where you can register web routes for your application. These
|
|
|
11 |
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
12 |
| contains the "web" middleware group. Now create something great!
|
|
|
13 |
|
|
|
|
14 |
*/
|
|
|
15 |
|
| 68 |
lars |
16 |
Route::get("/directory/{id}", function ($id) {
|
| 70 |
lars |
17 |
$menu = \App\Models\Directory::where("directory_id", -1)->get();
|
| 68 |
lars |
18 |
$dirs = \App\Models\Directory::where("directory_id", $id)->get();
|
|
|
19 |
$items = \App\Models\Item::where("directory_id", $id)->get();
|
| 70 |
lars |
20 |
return view('subdir', ["dirs" => $dirs, "items" => $items, "menu" => $menu,]);
|
| 67 |
lars |
21 |
});
|
| 74 |
lars |
22 |
Route::get("/item/{id}", function ($id) {
|
|
|
23 |
$menu = \App\Models\Directory::where("directory_id", -1)->get();
|
|
|
24 |
$item = \App\Models\Item::find($id);
|
|
|
25 |
return view('item', ["item" => $item, "menu" => $menu,]);
|
|
|
26 |
});
|
| 2 |
lars |
27 |
Route::get('/', function () {
|
| 16 |
lars |
28 |
$aktion = \App\Models\Action::all();
|
| 68 |
lars |
29 |
$dirs = \App\Models\Directory::where("directory_id", -1)->get();
|
|
|
30 |
return view('startpage', ["aktion" => $aktion, "menu" => $dirs,]);
|
| 2 |
lars |
31 |
});
|