1. Go to this page and download the library: Download plank/publisher 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/ */
plank / publisher example snippets
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Plank\Publisher\Concerns\IsPublishable;
use Plank\Publisher\Contracts\Publishable;
class Post extends Model implements Publishable
{
use IsPublishable;
}
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends SnapshotMigration
{
public function up()
{
Schema::table('posts', function (Blueprint $table) {
$table->string('status');
$table->boolean('has_been_published');
$table->boolean('should_delete');
$table->json('draft')->nullable();
});
}
}
bash
php artisan publisher:install
bash
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.