chameleon2die4/wpbones-extend

This library add additional functionality for WP Bones framework.

1.0.8 2023-11-01 22:11 UTC

This package is auto-updated.

Last update: 2024-03-31 08:45:39 UTC


README

PHP Composer Latest Version Packagist PHP Version Require License

This library add additional functionality for WP Bones framework.

Installation

Composer:

Browse into directory and run;

$ composer require chameleon2die4/wpbones-extend

You can configure your composer.json to copy files when you update your dependencies:

...
"scripts": {
    "post-update-cmd": [
        "Chameleon2die4\\WPBonesExtend\\WPBonesExtend::copyInitFiles"
    ]
},

If you rename plugin - change Chameleon2die4 to your namespace.

It's copy new bones files, with new commands. Additional copy stubs templates for commands. After files will be copied, you can remove this part from composer.json.

WP Bones features

New bones commands:

make:service            Create a new Service
make:resource           Create a new Resource
make:meta               Create a new MetaBox

migrate:up              Run your migrations
migrate:rollback        Run rollback for your migrations

New migrations

    $this->create("your_table", function (Blueprint $table){
        $table->id();
        $table->integer('user_id')->nullable();
        $table->string('name');
        $table->string('link')->nullable();
    });