1. Go to this page and download the library: Download websight/l5-polyfaq 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/ */
websight / l5-polyfaq example snippets
composer
Websight\Polyfaq\PolyfaqServiceProvider::class,
use Websight\Polyfaq\FaqTrait;
class MyModel extends Model {
use FaqTrait;
}
class MyModel extends Model {
/**
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function coolfaqs()
{
return $this->morphMany('Websight\Polyfaq\Faq', 'faqable');
}
}