sneevilz
sneevilz
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
which permissions sir
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
No description
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
umm, where?
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
so, what should i do sir?
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
what should i do, sir?
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
No description
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
here, stuck on uploading @Leandro Ferreira
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
No description
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
No description
20 replies
FFilament
Created by sneevilz on 2/5/2025 in #❓┊help
Need help for fileupload
Forms\Components\FileUpload::make('foto')
->image()
->acceptedFileTypes(['image/png','image/x-png','image/jpg','image/jpeg'])
->disk('public')
->directory('barang/foto')
->visibility('public')
->fetchFileInformation(false)
->label('Foto Barang'),
Forms\Components\FileUpload::make('foto')
->image()
->acceptedFileTypes(['image/png','image/x-png','image/jpg','image/jpeg'])
->disk('public')
->directory('barang/foto')
->visibility('public')
->fetchFileInformation(false)
->label('Foto Barang'),
20 replies
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