PHP code example of ngiraud / posttype-management

1. Go to this page and download the library: Download ngiraud/posttype-management 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/ */

    

ngiraud / posttype-management example snippets


'providers' => [
    // ...
    NGiraud\PostType\PostTypeServiceProvider::class,
];

$table->increments('id');
$table->unsignedInteger('user_id');
$table->unsignedInteger('parent_id')->nullable();
$table->string('name');
$table->string('slug');
$table->unsignedTinyInteger('status');
$table->text('excerpt')->nullable();
$table->longText('content')->nullable();
$table->timestamp('published_at')->nullable();
$table->timestamps();
$table->softDeletes();
bash
php artisan posttype:create MYPOSTTYPE [-m|--migrate] [--ctrl-folder=MYFOLDER]
bash
php artisan posttype:create MYPOSTTYPE --ctrl-folder=MYFOLDER
bash
php artisan posttype:create MYPOSTTYPE -m
bash
php artisan posttype:remove MYPOSTTYPE