wah.moe/resources/views/pages/bookmarks.blade.php
Frankie B fb045348cf
feat: move bookmarks to database (#9)
* Move bookmarks to SQL DB
* Increment version
2023-07-19 01:50:07 +01:00

29 lines
754 B
PHP

@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