Charly / Toufloux
Charly / Toufloux
FFilament
Created by Charly / Toufloux on 9/8/2024 in #❓┊help
Is Filament the good choice for a VILT app ?
To be honest, I don't really know, for the security, isn't just a matter of an Admin Middleware on the routes to be sure that the user is the admin + the form validation to get only the data we want ?
11 replies
FFilament
Created by Charly / Toufloux on 9/8/2024 in #❓┊help
Is Filament the good choice for a VILT app ?
Alright thanks, do you know a package like Filament but back end only ? Or maybe I'll just have to ignore the design I wanted and use Filament, since it's working very well (I already tried it) :/ Initially I wanted to do it on my own with a JS array like this one that'll automatically use the good inputs etc.., but some friend told me that this is a really bad idea for the security part, I can't secure that enough alone, what do you think of that ?
{
'model' : 'Partner',
'icon' : PartnerSVG,
'title' : 'titleAdminPartner',
'slug' : 'partners',
'inputs' : [
{
'name' : 'name',
'title' : 'titleColumnName',
'type' : 'text'
},
{
'name' : 'description',
'title' : 'titleColumnDescription',
'type' : 'text'
},
{
'name' : 'image_path',
'title' : 'titleColumnImagePath',
'type' : 'file'
},
{
'name' : 'url',
'title' : 'titleColumnUrl',
'type' : 'url'
},
]
},
{
'model' : 'Partner',
'icon' : PartnerSVG,
'title' : 'titleAdminPartner',
'slug' : 'partners',
'inputs' : [
{
'name' : 'name',
'title' : 'titleColumnName',
'type' : 'text'
},
{
'name' : 'description',
'title' : 'titleColumnDescription',
'type' : 'text'
},
{
'name' : 'image_path',
'title' : 'titleColumnImagePath',
'type' : 'file'
},
{
'name' : 'url',
'title' : 'titleColumnUrl',
'type' : 'url'
},
]
},
11 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
Ok, it's working, I have to manually put livewire/livewire.js in the public folder :x
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
No description
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
No description
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
Hmmm, so EDIT N°2, if I comment images line, I don't have any errors
Forms\Components\FileUpload::make('monthly_offer_image_path')
->label('Affiche de l\'offre mensuel')
->helperText(new HtmlString('L\'image affiché sur l\'accueil pour l\'offre du mois. <strong>Meilleur taille: 480x640px</strong>'))
->hint(new HtmlString('<a href="https://squoosh.app/" target="_blank" title="Squoosh">Compresse l\'image sur Squoosh (format .avif)</a>'))
->hintColor('primary')
->hintIcon('heroicon-m-photo')
->image(),
Forms\Components\FileUpload::make('monthly_offer_image_path')
->label('Affiche de l\'offre mensuel')
->helperText(new HtmlString('L\'image affiché sur l\'accueil pour l\'offre du mois. <strong>Meilleur taille: 480x640px</strong>'))
->hint(new HtmlString('<a href="https://squoosh.app/" target="_blank" title="Squoosh">Compresse l\'image sur Squoosh (format .avif)</a>'))
->hintColor('primary')
->hintIcon('heroicon-m-photo')
->image(),
By the way, I'm using https://github.com/spatie/laravel-settings
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
Hi, I tried and the auth worked well with the route, here is the code I used
Route::get('/foo', function () {
echo auth()->user();
});

Route::get('/create-user', function () {
User::create([
'name' => 'Charly',
'email' => '[email protected]',
'password' => Hash::make('testtest123'),
]);
});

Route::get('/login-custom-route', function () {
Auth::login(User::where('name', '=', 'Charly')->first());

echo auth()->user();
});

Route::get('/logout-custom-route', function () {
Auth::logout();

echo (!is_null(auth()->user())) ? auth()->user() : 'Aucun utilisateur connecté';
});
Route::get('/foo', function () {
echo auth()->user();
});

Route::get('/create-user', function () {
User::create([
'name' => 'Charly',
'email' => '[email protected]',
'password' => Hash::make('testtest123'),
]);
});

Route::get('/login-custom-route', function () {
Auth::login(User::where('name', '=', 'Charly')->first());

echo auth()->user();
});

Route::get('/logout-custom-route', function () {
Auth::logout();

echo (!is_null(auth()->user())) ? auth()->user() : 'Aucun utilisateur connecté';
});
In the login, I have my user, if I reload the page, it's still me, in the foo it's me aswell, and if hit the logout, I got the Aucun utilisateur connecté EDIT: So I tried logging in with the client account with the route, and if I go to the /admin, it works a little bit, I'm in the admin panel, but I got a 500 SERVER ERROR, in the log that says [2024-01-19 13:21:36] production.ERROR: Livewire page component layout view not found: [components.layouts.app] {"userId":2,"exception":"[object] (Livewire\\Features\\SupportPageComponents\\MissingLayoutException(code: 0): Livewire page component layout view not found: [components.layouts.app] at /home/clairxn/www/vendor/livewire/livewire/src/Features/SupportPageComponents/SupportPageComponents.php:181) So maybe it's all due to Livewire
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
Hey, I'm coming again, I tried another thing : - Take the local files (where filament login works), upload them on my personal host (o2switch, witch cPanel), and only use php artisan storage:link as a command, I upload all the vendor manually to be in the same conditions as the other host.. And surprise, on this host it works ... - So then, I did the same things on the client host (OVH), and since I don't have a terminal or SSH, I did a symlink('../storage/app/public', '../public/storage'); from a route to create the symlink, and no surprise, it keep not working here, with the same unauthenticated and redirect back to the login :x I don't have anymore idea of where to find, if it works on local and other host with the same files, how can this be a code issue ? PS: I tried to login on the o2switch host without any storage link, and with the symlink approach, and both worked on this host
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
I delete all the sessions and views cached in storage>framework to try, nothing changed, what can I search for in the session ?
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
I have another host where I have a terminal (with cPanel), and it works, with the same conditions
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
When we do a php artisan make:filament-user, does it modify something in the background ? I create the User from a route with User::create(), do you think it's not a good equivalent ?
18 replies
FFilament
Created by Charly / Toufloux on 1/14/2024 in #❓┊help
Unauthenticated exception, can't login
Yeah, for the host, she is my first client, so I didn't really know what to do about the hosting, but I'll change for the next one. It might not be an error, but do you know where this can come from ? It returned to the login page but without any error message :/ I don't think it comes from the model, I have the function set correctly
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@claire-massagebienetre.fr') && $this->hasVerifiedEmail();
}
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@claire-massagebienetre.fr') && $this->hasVerifiedEmail();
}
18 replies
FFilament
Created by Charly / Toufloux on 1/12/2024 in #❓┊help
Check if filament is fully installed (can't log in, not related to canAccessPanel)
Oh ok, this is my first one, a family member of a friend, so I can't do this with her, but it's good to known, thx !
12 replies
FFilament
Created by Charly / Toufloux on 1/12/2024 in #❓┊help
Check if filament is fully installed (can't log in, not related to canAccessPanel)
So you pay yourself the hosting, and they pay you the price aswell each month ?
12 replies
FFilament
Created by Charly / Toufloux on 1/12/2024 in #❓┊help
Check if filament is fully installed (can't log in, not related to canAccessPanel)
What you mean by "I do the hosting" ? Like you own a server ?
12 replies
FFilament
Created by Charly / Toufloux on 1/12/2024 in #❓┊help
Check if filament is fully installed (can't log in, not related to canAccessPanel)
Debugbar is already install, and shown if I use the debug mode, but I don't see anything wrong
12 replies
FFilament
Created by Charly / Toufloux on 1/12/2024 in #❓┊help
Check if filament is fully installed (can't log in, not related to canAccessPanel)
I already check all this and find nothing. As Laravel developper we must have a terminal / SSH ? That's the only thing that not working on the website, if don't think the client would want to pay more to upgrade it's host plan (it's my first client)
12 replies
FFilament
Created by Charly / Toufloux on 1/10/2024 in #❓┊help
Login issue after deploying
Nop, it's loading some ms, then the page reload and the page is as clean as the first page load
31 replies
FFilament
Created by Charly / Toufloux on 1/10/2024 in #❓┊help
Login issue after deploying
No description
31 replies
FFilament
Created by Charly / Toufloux on 1/10/2024 in #❓┊help
Login issue after deploying
the page juste reload itself, without any error message
31 replies