sneevilz
sneevilz
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
anyway, thank you
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
idk why i have this code
// public function setPasswordAttribute($password)
// {
// $this->attributes['password'] = bcrypt($password);
// }
// public function setPasswordAttribute($password)
// {
// $this->attributes['password'] = bcrypt($password);
// }
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
<?php

namespace App\Models;

// 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 Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Filament\Models\Contracts\HasAvatar;
use Illuminate\Support\Facades\Storage;


use Spatie\Permission\Traits\HasRoles;
use BezhanSalleh\FilamentShield\Traits\HasPanelShield;

use TomatoPHP\FilamentDiscord\Traits\InteractsWithDiscord;

class User extends Authenticatable implements HasAvatar, FilamentUser
{
use HasApiTokens;
use HasRoles;
use HasPanelShield;
use HasFactory;
use Notifiable;
use InteractsWithDiscord;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/

protected $guarded = [
'id',
];
// protected $fillable = [
// 'name',
// 'no_hp',
// 'alamat',
// 'email',
// 'password',
// 'role',
// 'cabangs_id',
// 'bisnis_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 setPasswordAttribute($password)
// {
// $this->attributes['password'] = bcrypt($password);
// }


// public function addres() : Morphone
// {
// return $this->morphone(related:addres::class,name:'addresable');
// }

public function getFilamentAvatarUrl(): ?string
{
return $this->avatar_url ? Storage::url("$this->avatar_url") : null;
}

public function bisnis()
{
return $this->belongsTo(Bisnis::class);
}
public function cabang()
{
return $this->belongsTo(Cabang::class, 'cabangs_id');
}

public function canAccessPanel(Panel $panel): bool
{
return $this->email && $this->password;
}

}
<?php

namespace App\Models;

// 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 Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Filament\Models\Contracts\HasAvatar;
use Illuminate\Support\Facades\Storage;


use Spatie\Permission\Traits\HasRoles;
use BezhanSalleh\FilamentShield\Traits\HasPanelShield;

use TomatoPHP\FilamentDiscord\Traits\InteractsWithDiscord;

class User extends Authenticatable implements HasAvatar, FilamentUser
{
use HasApiTokens;
use HasRoles;
use HasPanelShield;
use HasFactory;
use Notifiable;
use InteractsWithDiscord;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/

protected $guarded = [
'id',
];
// protected $fillable = [
// 'name',
// 'no_hp',
// 'alamat',
// 'email',
// 'password',
// 'role',
// 'cabangs_id',
// 'bisnis_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 setPasswordAttribute($password)
// {
// $this->attributes['password'] = bcrypt($password);
// }


// public function addres() : Morphone
// {
// return $this->morphone(related:addres::class,name:'addresable');
// }

public function getFilamentAvatarUrl(): ?string
{
return $this->avatar_url ? Storage::url("$this->avatar_url") : null;
}

public function bisnis()
{
return $this->belongsTo(Bisnis::class);
}
public function cabang()
{
return $this->belongsTo(Cabang::class, 'cabangs_id');
}

public function canAccessPanel(Panel $panel): bool
{
return $this->email && $this->password;
}

}
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
yes
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
i deleted the
public function setPasswordAttribute($password)
{
$this->attributes['password'] = bcrypt($password);
}
public function setPasswordAttribute($password)
{
$this->attributes['password'] = bcrypt($password);
}
in User.php models
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
but not this
16 replies
FFilament
Created by sneevilz on 10/8/2024 in #❓┊help
php artisan make:filament-user bug
fixed
16 replies
FFilament
Created by sneevilz on 9/30/2024 in #❓┊help
autorefresh / liveserver
thank you!
4 replies
FFilament
Created by sneevilz on 9/25/2024 in #❓┊help
FOOTER COLUMN
thank uuu
5 replies
FFilament
Created by sneevilz on 9/25/2024 in #❓┊help
FOOTER COLUMN
No description
5 replies
FFilament
Created by sneevilz on 9/13/2024 in #❓┊help
Filament DatePicker Widget
Thankyou!
5 replies
FFilament
Created by sneevilz on 9/13/2024 in #❓┊help
Filament DatePicker Widget
anyone?
5 replies
FFilament
Created by sneevilz on 9/11/2024 in #❓┊help
Navigation Group
alright, thank you..
10 replies
FFilament
Created by sneevilz on 9/12/2024 in #❓┊help
Image not showing on table column
It's okay, I did it on purpose 😊 anyway, thank you a lott
41 replies
FFilament
Created by sneevilz on 9/12/2024 in #❓┊help
Image not showing on table column
thankyou!
41 replies
FFilament
Created by sneevilz on 9/12/2024 in #❓┊help
Image not showing on table column
so the problem, is in the models?
41 replies
FFilament
Created by sneevilz on 9/12/2024 in #❓┊help
Image not showing on table column
alright, big thankss!
41 replies