PHP code example of balajidharma / laravel-viewable
1. Go to this page and download the library: Download balajidharma/laravel-viewable 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/ */
balajidharma / laravel-viewable example snippets
namespace BalajiDharma\LaravelForum\Models;
use BalajiDharma\LaravelViewable\Traits\HasViewable;
use Illuminate\Database\Eloquent\Model;
class Thread extends Model
{
use HasViewable;
public function show(Thread $thread)
{
$thread->record();