Link user to record.
Does Filament have some out of the box functionality which for example when you create an order, everyone can see who created the order? In other words: add the loggedin user to the order record? Or do I have to manually create the relation and add it to the order record?
Solution:Jump to solution
If you still want to solve this with Filament, you can do the following on the CreateRecord page:
```php
protected function afterCreate(): void
{
$record = $this->getRecord();...
3 Replies
In Filament, there is nothing for that. But there are various Laravel packages that can do it. Take a look at wildside/userstamps, for example.
Solution
If you still want to solve this with Filament, you can do the following on the CreateRecord page:
However, you should keep in mind that only models created from within Filament will have the user set.
Ok thanks for your feedback