PHP code example of webbingbrasil / laravel-taxonomies
1. Go to this page and download the library: Download webbingbrasil/laravel-taxonomies 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/ */
webbingbrasil / laravel-taxonomies example snippets
namespace App\Models;
use WebbingBrasil\Taxonomies\Traits\HasTaxonomies;
class Post extends Model
{
use HasTaxonomies;
// ...
}
namespace App\Models;
use WebbingBrasil\Taxonomies\AbstractTerm;
class Category extends AbstractTerm
{
/**
* Taxonomy name
*
* @return string
*/
public function getTaxonomy()
{
return 'category';
}
// ...
}
namespace App\Models;
use WebbingBrasil\Taxonomies\AbstractTerm;
class Tag extends AbstractTerm
{
/**
* Taxonomy name
*
* @return string
*/
public function getTaxonomy()
{
return 'tag';
}
// ...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.