PHP code example of fuelviews / laravel-sabhero-blog
1. Go to this page and download the library: Download fuelviews/laravel-sabhero-blog 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/ */
fuelviews / laravel-sabhero-blog example snippets
use Fuelviews\SabHeroBlog\SabHeroBlog;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
SabHeroBlog::make()
])
}
namespace App\Models;
use Filament\Panel;
use Fuelviews\SabHeroBlog\Traits\HasAuthor;
use Fuelviews\SabHeroBlog\Traits\HasBlog;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasAvatar;
class User extends Authenticatable implements FilamentUser, HasAvatar
{
use HasFactory, Notifiable, HasBlog, HasAuthor;
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@your-domain-here.com');
}
}