aboutsummaryrefslogtreecommitdiff
path: root/resources/views/pages/bookmarks.blade.php
blob: ee913340d4a076df2829ce9aa79acceef04def0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@extends('layouts.default')
@section('title', 'bookmarks')
@section('description', 'This is the personal homepage of floppydisk.')
@section('content')
@php
    $categories = DB::select('
        SELECT id, name
        FROM bookmark__categories
        ORDER BY priority ASC
    ');
@endphp

@foreach ($categories as $category)
    <h1>{{ $category->name }}</h1>
    @php
        $sites = DB::select('
            SELECT name, url, description
            FROM bookmark__sites
            WHERE category_id = ? ORDER BY priority ASC
        ', array($category->id));
    @endphp
    <ul>
    @foreach ($sites as $site)
        <li><a href="{{ $site->url }}">{{ $site->name }}</a> - {{ $site->description }}</li>
    @endforeach
    </ul>
@endforeach
@stop