Files
RomhackPlaza/routes/breadcrumbs.php

57 lines
2.0 KiB
PHP
Raw Normal View History

2026-05-20 18:25:15 +02:00
<?php
use Diglactic\Breadcrumbs\Generator;
Breadcrumbs::for('home', function ( Generator $trail) {
$trail->push('Home', route('home'));
});
Breadcrumbs::for('entries.index', function ( Generator $trail) {
$trail->parent('home');
$trail->push('Database', route('entries.index'));
});
Breadcrumbs::for('entries.show', function ( Generator $trail, string $section, \App\Models\Entry $entry) {
$trail->parent('entries.index');
$trail->push($entry->title, route('entries.show', [ $section, $entry ] ) );
});
2026-06-16 16:21:43 +02:00
Breadcrumbs::for('entries.drafts', function ( Generator $trail ) {
$trail->parent('home');
$trail->push('Drafts', route('entries.drafts'));
});
2026-05-20 18:25:15 +02:00
2026-06-16 16:21:43 +02:00
Breadcrumbs::for('submit.index', function ( Generator $trail ) {
$trail->parent('home');
$trail->push('Submit', route('submit.index'));
});
2026-05-20 18:25:15 +02:00
Breadcrumbs::for('submit.create', function ( Generator $trail, string $section ) {
$trail->parent('home');
$trail->push('Submit', route('submit.create', [ $section ] ) );
});
Breadcrumbs::for('submit.edit', function ( Generator $trail, string $section, \App\Models\Entry $entry ) {
$trail->parent('entries.show', $section, $entry);
$trail->push('Edit', route('submit.edit', [ $section, $entry ] ) );
});
2026-06-16 16:21:43 +02:00
Breadcrumbs::for('news.index', function ( Generator $trail ) {
$trail->parent('home');
$trail->push('News', route('news.index'));
});
Breadcrumbs::for('news.show', function ( Generator $trail, \App\Models\News $news ) {
$trail->parent('news.index');
$trail->push($news->title, route('news.show', [ $news ] ) );
});
Breadcrumbs::for('news.create', function ( Generator $trail ) {
$trail->parent('home');
$trail->push('Submit', route('news.create') );
});
Breadcrumbs::for('news.edit', function ( Generator $trail, \App\Models\News $news ) {
$trail->parent('news.show', $news);
$trail->push('Edit', route('news.edit', [ $news ] ) );
});
Breadcrumbs::for('queue.index', function ( Generator $trail ) {
$trail->parent('home');
$trail->push('Submissions Queue', route('queue.index') );
});