i really can't play that
Multi-tenancy and createOptionForm on Select, Field 'company_id' doesn't have a default value
what about this?
protected function mutateFormDataBeforeCreate(array $data): array
{
$data['company_id'] = auth()->user()->company_id;
return $data;
}
14 replies
Javascript address autocomplete
I used it in another application, so Iam used to it and also it is updated daily from czech official addresses. I somehow overlooked your package, so i will give it a try, because this is pain and I address autocomplete is crucial. Thanks (y)
6 replies
Has anyone implemented Filamentv3 with tenancyfolaravel https://tenancyforlaravel.com/
Well, right now my multidatabase multinenancy is done by this method in Kernel.php
public function bootstrap()
{
$host = request()->getHost();
$subdomain = explode('.', $host)[0];
$envFile = '.env.' . $subdomain;
$envPath = base_path();
$envFilePath = $envPath . '/' . $envFile;
if (!file_exists($envFilePath)) {
abort(404, 'chyba');
}
app()->loadEnvironmentFrom($envFile);
parent::bootstrap();
}
But I would like to try the package.13 replies
Javascript address autocomplete
I tried to create a javascript listener which would update "value" attribute of corresponding field, but with no success:
document.querySelector('.smartform-instance-personal.smartform-street-and-number').addEventListener('input', function() {
var personalAddress = this.textContent; // nebo this.innerText
document.querySelector('.smartform-instance-personal.smartform-street-and-number').value(personalAddress);
});
6 replies