| 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) {
|
|
|
17 |
$dirs = \App\Models\Directory::where("directory_id", $id)->get();
|
|
|
18 |
$items = \App\Models\Item::where("directory_id", $id)->get();
|
|
|
19 |
return view('subdir', ["dirs" => $dirs, "items" => $items,]);
|
| 67 |
lars |
20 |
});
|
| 2 |
lars |
21 |
Route::get('/', function () {
|
| 16 |
lars |
22 |
$aktion = \App\Models\Action::all();
|
| 68 |
lars |
23 |
$dirs = \App\Models\Directory::where("directory_id", -1)->get();
|
|
|
24 |
return view('startpage', ["aktion" => $aktion, "menu" => $dirs,]);
|
| 2 |
lars |
25 |
});
|