PHP code example of glaivepro / drafterer

1. Go to this page and download the library: Download glaivepro/drafterer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

glaivepro / drafterer example snippets

 bash
$ php artisan migrate
 php
$article->drafterer->write();
 php
$article->drafterer->discard();
 php
$article->title;  // returns 'Real title'

$article->drafterer->load();

$article->title;  // returns 'Draft title'