Make Page Command
The make:page
command allows you to create a new page - including page data class and content file.
php artisan make:page Post --collection=blog
This command will create the following two files.
<?php
namespace App\Pages;
use Astrotomic\Stancy\Models\PageData;
use Astrotomic\Stancy\Traits\PageHasContent;
use Astrotomic\Stancy\Traits\PageHasDate;
use Astrotomic\Stancy\Traits\PageHasOrder;
use Astrotomic\Stancy\Traits\PageHasSlug;
class Post extends PageData
{
}
After this you can rename the created markdown file, add the view to use and your content.
Last updated
Was this helpful?