Skip to content

Instantly share code, notes, and snippets.

@robert-michels
Last active March 23, 2021 02:03
Show Gist options
  • Select an option

  • Save robert-michels/6af2a14f9fd4d08094ef29c3dc8bcd6b to your computer and use it in GitHub Desktop.

Select an option

Save robert-michels/6af2a14f9fd4d08094ef29c3dc8bcd6b to your computer and use it in GitHub Desktop.
<?php
// CODE SNIPPET, NOT THE FULL FILE //
/*************************************************
** INDIVIDUAL OMEN ROUTE
*************************************************/
// Add the individual omen route
Route::get('/omen/([a-z0-9]+(?:-[a-z0-9]+)*)', function($slug) {
$omen = OmenCollection::getOmenBySlug($slug);
Page::build('omen', ["omen" => $omen]);
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment