Create dynamic pages for your application such as Terms, Privacy, etc.
PageSeeder.php
route_name
group
legal
about
app/Enums/PageGroup.php
enum PageGroup: string { case Legal = 'legal'; case About = 'about'; }
// This will create "Privacy Policy" page with "/privacy-policy" URL and "legal.privacy" route name Page::create([ 'title' => 'Privacy Policy', 'url_path' => 'privacy-policy', 'route_name' => 'privacy', 'content' => '<p>Privacy Policy content...</p>', ]); // This will create "About" page with "/about" URL and "about.index" route name Page::create([ 'title' => 'About', 'url_path' => 'about', 'route_name' => 'index', 'group' => PageGroup::About, 'content' => '<p>About content...</p>', ]);