NeerGreeN
export excel query
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'editions.id' in 'where clause'
SELECT
*
FROM
calendars
WHERE
calendars.
edition_id = 2
AND
calendars.
edition_id IS NOT NULL
AND
editions.
id IN (125, 126, 127)
ORDER BY
calendars.
id ASC
limit
100 OFFSET 0
9 replies
Email Verification
return $panel
->default()
->id('admin')
->path('')
->login()
->passwordReset()
->emailVerification()
->profile()
->colors([
'primary' => '#14315b'
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->maxContentWidth(MaxWidth::Full)
->authMiddleware([
Authenticate::class,
])
->plugin(
FilamentSpatieLaravelHealthPlugin::make()
->usingPage(HealthCheckResults::class)
);
13 replies
Email Verification
<?php
namespace App\Models;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use HasApiTokens, HasFactory, Notifiable, HasRoles;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
'customer_id',
'professor_id',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@evolvestudio.it') && $this->hasVerifiedEmail();
}
public function activity()
{
return $this->hasMany(ActivityType::class);
}
public function customer()
{
return $this->belongsTo(Customer::class);
}
public function professor()
{
return $this->belongsTo(Professor::class);
}
}
13 replies