artisanry/pages

Pages for Laravel 5

2.1.0 2019-06-04 07:19 UTC

README

Build Status PHP from Packagist Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require artisanry/pages

Migration

To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Artisanry\Package\PagesServiceProvider"

And then run the migrations to setup the database table.

$ php artisan migrate

Usage

Create a new Page
Page::create([
    'title' => str_random(10),
    'content' => '# Hello World!',
    'meta' => [
        'title' => str_random(10),
        'description' => str_random(10),
        'author' => str_random(10),
        'keywords' => implode(',' $faker->randomElements()),
    ],
    'status' => Page::STATUS_PUBLISHED,
    'type' => Page::TYPE_MARKDOWN,
]);
Parse the title, content and meta attributes.
$page->parse();

Testing

$ phpunit

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@basecode.sh. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

License

Mozilla Public License Version 2.0 (MPL-2.0).