John Parker
John Parker
FFilament
Created by John Parker on 10/4/2023 in #❓┊help
Eloquent `point` field type data triggers "Unexpected end of JSON input"
I’m afraid not - I just lived with the “hidden” workaround.
13 replies
FFilament
Created by Merlijn01 on 3/28/2024 in #❓┊help
Spatie Media Library set alt text
@Merlijn01 Did you ever find a sensible solution to this? Is seems odd that there's no alt text support. 🤔
3 replies
FFilament
Created by John Parker on 3/4/2024 in #❓┊help
Form Builder support for polymorphic relationships
Arrrgghh… it of course works perfectly if you actually point it at the correct relationship property that's set as MorphOne.
2 replies
FFilament
Created by John Parker on 11/8/2023 in #❓┊help
Setting value of relationship form field via $set closure
Yeah, using hiddenOn or visibleOn work in the same manner as just setting the field as hidden - the relationship isn't updated.
11 replies
FFilament
Created by John Parker on 11/8/2023 in #❓┊help
Setting value of relationship form field via $set closure
@toeknee In terms of my previous comment, should I create an issue on GitHub? I could understand the value not updating if the relationship field was set as disabled, but just being hidden doesn't feel like it should break the update.
11 replies
FFilament
Created by John Parker on 11/8/2023 in #❓┊help
Setting value of relationship form field via $set closure
Worthy of note if the fact that the process doesn't work if the field you're targeting with $set is hidden - the relationship isn't updated.
11 replies
FFilament
Created by John Parker on 11/8/2023 in #❓┊help
Setting value of relationship form field via $set closure
Ahh… yep. Providing an array of relationship "destination" model IDs works perfectly. Many thanks for the nudge in the right direction, @toeknee 🙌
11 replies
FFilament
Created by John Parker on 10/4/2023 in #❓┊help
Eloquent `point` field type data triggers "Unexpected end of JSON input"
To confirm, setting the location attribute as hidden via $hidden = [ 'location' ]; in the model resolves the issue.
13 replies
FFilament
Created by John Parker on 10/4/2023 in #❓┊help
Eloquent `point` field type data triggers "Unexpected end of JSON input"
@toeknee Unless of course you mean the Filament Resource column, in which case that model attribute isn't used within Filament. (It's effectively controlled by a pair of custom setters.) However, the probiem is that the very existence of spatial data in the field is breaking Livewire/Filament with the aforementioned "Unexpected end of JSON input" error. I'm almost tempted to dig into the config to ensure the database connection encoding is correct, etc. but none of this has changed from the Livewire v2/Filament v2 version, hence it looks very much like it's a v3 specific issue.
13 replies
FFilament
Created by John Parker on 10/4/2023 in #❓┊help
Eloquent `point` field type data triggers "Unexpected end of JSON input"
It's a point column, which is a specific thing, at least in MySQL/MariaDB and (I'm guessing) PostgreSQL. The database migration is…
public function up(): void
{
Schema::create('table_name', function (Blueprint $table) {
$table->id();

$table->point('location')->spatialIndex();
});
}
public function up(): void
{
Schema::create('table_name', function (Blueprint $table) {
$table->id();

$table->point('location')->spatialIndex();
});
}
https://laravel.com/docs/10.x/migrations#column-method-point
13 replies
FFilament
Created by John Parker on 8/24/2023 in #❓┊help
Equivalent of `filament.pages.dashboard` route?
Ahh… don't believe I forgot about the Artisan command. (Clearly having one of those days.) I think the Dashboard::getUrl() is the correct approch. 👍
7 replies
FFilament
Created by John Parker on 6/22/2023 in #❓┊help
Customise 'titleContentName' content of Form Select component relationship
Damn, Filament really is nice. 😀
4 replies
FFilament
Created by John Parker on 4/6/2023 in #❓┊help
Recommended approach for replacing Filament login with Jetstream?
Ooo… so close. I'm guessing I also need to change the Filament logout menu option, as it throws a Method Illuminate\Auth\RequestGuard::logout does not exist. error otherwise. Then again, replacing the "user" menu with the Jetstream equivalent would likely make more sense. Time to do more hunting.
24 replies