PHP code example of unisharp / categorizable

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

    

unisharp / categorizable example snippets


$post->decategorize();


$post->recategorize(1);

$post->recategorize("News");

$post->recategorize([1, "news"]);

$post->recategorize(1, "news");


Post::hasCategories('News', 1)->get();

Post::hasStrictCategories('News', 1)->get();

Post::hasCategories('News', 1)->get();
 php
$post->uncategorize(1);

$post->uncategorize("News");

$post->uncategorize([1, "news"]);

$post->uncategorize(1, "news");