Filament Login Form: More Validation Rules
3:31
Пікірлер
@hussain4real
@hussain4real 23 сағат бұрын
you can use same widget for List and View/Edit. all you need is to wrap the `where()` statement in a `when()` function
@AugustineOsaretin
@AugustineOsaretin Күн бұрын
This awesome lesson
@DeTechDivus
@DeTechDivus Күн бұрын
As a tip, there is also getFooterWidgets.
@emmanuel71-dev
@emmanuel71-dev Күн бұрын
If you want to omit one of the values in the enum for a ToggleButton, you could do it like so: Forms\Components\ToggleButtons::make('status') ->options( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getLabel()]) ->toArray() ) ->colors( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getColor()]) ->toArray() ) ->icons( collect(StatusEnum::cases()) ->filter(fn($status) => $status !== StatusEnum::CLOSED) ->mapWithKeys(fn($status) => [$status->value => $status->getIcon()]) ->toArray() ),
@MelvinMihaylov
@MelvinMihaylov Күн бұрын
Thanks for the helpful tutorial. Is it possible to show another example for MorphToSelect and how can we use it with Set and Get functionality with another field for example TagsInput
@Sam-s69v
@Sam-s69v 2 күн бұрын
When I click on sendinvoice, nothing happens? Do I have setup something else which is not mentioned in the tutorial?
@irismo91
@irismo91 2 күн бұрын
I can't do it, when I try to use php artisan make:filament-page Auth/Register it asks me to choose what kind of page I want to create, also it doesn't create it the same way as in the tutorial, but in a folder called RegisterResource, I think I'm doing something wrong.
@aries_dg
@aries_dg 2 күн бұрын
Once user is deactivated, how can i automatically log them out and display that validation error on login page?
@krekas
@krekas 2 күн бұрын
middleware
@nazar87ali
@nazar87ali 2 күн бұрын
The filament creates a problem in performance
@krekas
@krekas 2 күн бұрын
so don't use it
@nazar87ali
@nazar87ali 2 күн бұрын
@@krekas yes i not used it in big project and online project .
@relaxationtube2388
@relaxationtube2388 2 күн бұрын
I’ve used filament in a large project currently online and serving 100s of users. I did not notice any performance issue
@leonvanrijswijk8409
@leonvanrijswijk8409 3 күн бұрын
Instead of copy/paste the code, is it possible to do something like 'call parentClass.authenticate()'? That way you would use the latest code of the parentclass when it is improved/updated.
@pauloclara4764
@pauloclara4764 3 күн бұрын
happy new year... thanks for staying active on youtube... how can I keep track of user activity, i.e. know which items were created, changed or deleted by users...
@krekas
@krekas 3 күн бұрын
use package like spatie activity
@olivierperrier114
@olivierperrier114 3 күн бұрын
Happy new year ! Thank you for this useful content My approach would be to create a custum rule and call it in the email input but I never tried. Do you think it could work?
@krekas
@krekas 3 күн бұрын
why not try it?
@FilamentDaily
@FilamentDaily 3 күн бұрын
Yes that could probably also work
@H4L1M_
@H4L1M_ 3 күн бұрын
This should be the default!!!
@onlinebusinessblog2910
@onlinebusinessblog2910 3 күн бұрын
Good day to you, i am having difficulty just now i discovered that my import modal is no longer opening, but it was working fine.
@DwikyRestu-nb4od
@DwikyRestu-nb4od 6 күн бұрын
how to use numeric on custom fields?
@Sdirimohamedsalah
@Sdirimohamedsalah 7 күн бұрын
Thank you Povilas. I’m working on a form like this for real estate web app and I have a small problem. How change the repeating behavior? For example a house with 4 rooms 2 bathrooms.. how create 4 new fields based on text input field entered by the user to describe each room and upload photos ?
@FilamentDaily
@FilamentDaily 5 күн бұрын
Personally, I would create a separate page to describe each room if there are multiple photos to upload and more than one field. Otherwise the form is just too long to be filled conveniently, and much bigger possibility of bugs.
@H4L1M_
@H4L1M_ 7 күн бұрын
Isn't using a Policy better ? Am I missing something
@H4L1M_
@H4L1M_ 7 күн бұрын
Can we disable the Button while the next page is loading?
@luiscevallos1
@luiscevallos1 9 күн бұрын
Happy new year ... Thanks for all
@peterstiens
@peterstiens 9 күн бұрын
Thanks a lot. That's what I was looking for.
@Sdirimohamedsalah
@Sdirimohamedsalah 10 күн бұрын
This video is a huge time saver! I think filament should implement this guide. Thank you Povilas ! I like the way you thinking out of the box
@aymanmalhattami
@aymanmalhattami 11 күн бұрын
Great tip
@alfandirifaul
@alfandirifaul 11 күн бұрын
where can i found the Login.php, because i try for looking for that but i dont find it
@Sdirimohamedsalah
@Sdirimohamedsalah 12 күн бұрын
Great plugin!
@krishna__path_365
@krishna__path_365 13 күн бұрын
How do I search for a full name in a dropdown?
@ryiad2010
@ryiad2010 14 күн бұрын
thank you its very helpful
@alyxson
@alyxson 14 күн бұрын
Hey!!, there are any performance differences on the user side by switching a long modal for a wizard?
@ibadurrahmanhafirizul9947
@ibadurrahmanhafirizul9947 15 күн бұрын
Thank u for sharing your knowledge sir 🙌
@GiedriusKartanovic
@GiedriusKartanovic 15 күн бұрын
You could further reduce repetition by passing reference to the method (PHP >=8.1) e.g. `->afterStateUpdated(self::updateTotalCost(...))`
@thugsofpunjab8091
@thugsofpunjab8091 17 күн бұрын
can someone tell how to customize this pacakge i want to customize the view of this pacakge
@leslieprice
@leslieprice 17 күн бұрын
Hi, when the sidebar is collapsed, how can one also collapse the button into an iconButton?
@محمدرضاخدامی
@محمدرضاخدامی 20 күн бұрын
can i use another resource for that? i have a post and a author both have their resource and their infolist method inside their resource. i want to show author infolist when clicking on its name. is there a way to do that?
@jonnhybravo
@jonnhybravo 21 күн бұрын
great! But the modal is not opened in this way. Exists some tips?
@edgarteichert5587
@edgarteichert5587 21 күн бұрын
Hi, there. It's also possible to put the closure in the function itself. Then one just needs to put the function name in. E.g. ->afterStateUpdated(static::updateTotalCost()) then return fn($set, $get) => doSomething() in the function itself. Even less code and nice look.
@rishharris8808
@rishharris8808 21 күн бұрын
How to handle redirecting a removed user from a team to a specific route in a multi-tenancy
@faridmoreno2864
@faridmoreno2864 21 күн бұрын
Thank you for those tips! I have a question: How Can I put the some logic (total_cost) in a service class? Because, I want use this logic in other system parts :D
@FilamentDaily
@FilamentDaily 20 күн бұрын
Well yeah, create a service class and put a function with parameters in there, not sure what is the question here :)
@faridmoreno2864
@faridmoreno2864 6 күн бұрын
@@FilamentDaily Sorry, I meant how can I call the function in Filament resources?
@FilamentDaily
@FilamentDaily 6 күн бұрын
@@faridmoreno2864 Well you create the object of that service class and then call the function you need. Sorry hard to answer without specific examples.
@mrebene
@mrebene 21 күн бұрын
Thanks for this video. I tried using the $set in my modal select box in a relation manager but it does not seem to work
@archiealvarado8831
@archiealvarado8831 22 күн бұрын
I am learning Filament. It is just a Livewire with the shortcuts. Is it still relevant in the future because it looks like low code programming. Should I master it? Here in the PH nobody uses it.
@FilamentDaily
@FilamentDaily 21 күн бұрын
It depends on what projects you wanna work with. For each kind of projects, there are different languages and frameworks. Filament definitely has its niche. The question is do you see that niche and wanna be part of it.
@marlo4108
@marlo4108 22 күн бұрын
man you are fire🔥🔥🔥🔥🔥🔥
@0xshaheen
@0xshaheen 22 күн бұрын
you can shorten it to this: ->afterStateUpdated( self::updateTotalCost(...) ) which will pass the parameters $set and $get to the callback, instead of doing it manually
@0xshaheen
@0xshaheen 22 күн бұрын
I haven't tried it but I think it will work
@nazar87ali
@nazar87ali 22 күн бұрын
why ->rules(['required']) not work with FileUpload
@KONEY.INDUSTRIAL
@KONEY.INDUSTRIAL 22 күн бұрын
Nice! A bit akward when ->hint() is already used for something else... so in my case I attached the spinner to a ->helperText() which also render just below the clicked element. Thanks :)
@1io6
@1io6 23 күн бұрын
i have question when i use userMenuItems to customize the user menuitems the lang always english even i switch to onther langage , this is my code ->userMenuItems([ 'profile' => MenuItem::make() ->label(fn() => auth()->user()->name) ->url(fn(): string => EditProfilePage::getUrl()) ->icon('heroicon-m-user-circle'), MenuItem::make() ->label(__('admin.profile')) ->url(fn(): string => EditProfilePage::getUrl()) ->icon('heroicon-o-cog-6-tooth'), 'logout' => MenuItem::make()->label(__('admin.log_out')) ]);
@FilamentDaily
@FilamentDaily 23 күн бұрын
See the first label is with fn() inside. Your other labels are without fn(). So you need to use that callback function inside.
@1io6
@1io6 23 күн бұрын
@@FilamentDaily thank you ❤️🌹
@KaptainProdex
@KaptainProdex 23 күн бұрын
any drawbacks or why this isn't enabled by default? Thanks!
@FilamentDaily
@FilamentDaily 23 күн бұрын
Not sure, to be honest.
@farhanmaulana8319
@farhanmaulana8319 23 күн бұрын
thanks alot man
@Claudio_Pereira
@Claudio_Pereira 23 күн бұрын
Thanks, Povilas, for this great tip.😊
@maruatajongte6293
@maruatajongte6293 23 күн бұрын
i used DB::Transactions, this would be so much easier
@mrmehdigh9622
@mrmehdigh9622 24 күн бұрын
As Always, very useful video 3:25
@TrikNgonlen
@TrikNgonlen 24 күн бұрын
Nah...ini dia yang saya butuhkan...MANTAP! Terima kasih, Om Povilas Korop...
@krekas
@krekas 24 күн бұрын
kitąkart rašyk angliškai
@TrikNgonlen
@TrikNgonlen 24 күн бұрын
@@krekas Lah...emang Elu pake bahasa inggris?
@NexusAlfa
@NexusAlfa 23 күн бұрын
Bjir ngakak
@TrikNgonlen
@TrikNgonlen 23 күн бұрын
@@NexusAlfa 😂🤣
@HindAALOUCH-u7x
@HindAALOUCH-u7x 24 күн бұрын
Thank you so much about the videos you're making. I have a question about a situation I'm encoutring on my project. I have a PartnersRelationManager into my projectResource, I'm using create action if there are no partners to attach and then I show the attach btn. But what I really want, is to add a create btn in the attachAction, so I can create a new partner if I didn't find the exact partner to attach from the select list. Any ideas?? Thank you 👍
@FilamentDaily
@FilamentDaily 24 күн бұрын
All I can think about is this Select and Create Option: filamentphp.com/docs/3.x/forms/fields/select#creating-a-new-option-in-a-modal But not sure if you can use it in your situation with Relation Managers.
@HindAALOUCH-u7x
@HindAALOUCH-u7x 24 күн бұрын
@@FilamentDaily I really don't know, but if there is a way to maintain the attachAction and use the select modal in it instead of the default select !!!? Any ideas of how to do it?!!! Thank you 🙂
@FilamentDaily
@FilamentDaily 23 күн бұрын
Sorry I don't have the answer to this
@HindAALOUCH-u7x
@HindAALOUCH-u7x 23 күн бұрын
@@FilamentDaily Thank you, I'm still searching about it, if I found a solution I will let you know 👍
@HindAALOUCH-u7x
@HindAALOUCH-u7x 21 күн бұрын
​@@FilamentDaily Hello Povilas, here is the solution I found: Add extraModalFooterActions to the AttachAction and use inside it CreateAction like the following. ->extraModalFooterActions([ Tables\Actions\CreateAction::make() ]) This will add a btn 'create' beside the 'attach' btn inside the AttachAction modal. If you want to control the creation form, you can use ->form([ TextInput::make('input') ->label(__('projProgRelations.organism')) ->maxLength(255) ->required(), ]) Hope this help someone else 😇