kurious7 / simple-pages
2.0.0
2022-11-14 15:07 UTC
Requires
- php: ^8.0
- spatie/laravel-sluggable: ^3.4
Requires (Dev)
- orchestra/testbench: ~3.5.0|~3.6.0|~3.7.0|~3.8.0|~3.9.0
- phpunit/phpunit: ^8.0
README
A Laravel package designed to add pages to your Laravel application. A page is just content defined by specific URL, or slug. A page may or may not be published.
Installation
Require the package using composer:
composer require kurious7/simple-pages
Publish the migration and config files
php artisan vendor:publish \
--provider="Kurious7\Pages\PagesServiceProvider"
Migrate
php artisan migrate
Usage
Create a Page model:
\Kurious7\Pages\Page::create([ 'title' => 'Hello, World', 'content' => '<p>Hi everybody</p>', 'public' => true, 'show_in_menu' => true, ]);
...which is now accessible by browsing to /hello-world
!
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.