bodhi8370
bodhi8370
FFilament
Created by bodhi8370 on 2/26/2024 in #❓┊help
Class "NumberFormatter" not found
The hosting company resolved it magically.
6 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
Thank you. It was the quote around the class. solved. I hope this post assists someone else in the future and I appreciate everyone's assistance on this.
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
No description
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
I'll start a new ticket somewhere else and report back here when this is solved.
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
No description
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
I followed this tutorial which led me to the Select dropdown option as you mentioned (hxxps://www.youtube.com/watch?v=c_hL4wKYfHY&list=PLqDySLfPKRn6fgrrdg4_SmsSxWzVlUQJo&index=8). He does a great example of showing how to connect categories to posts and it's what I've been working off of. However in my context I don't wish for a select or dropdown menu to select from. This is because is because I don't have multiple posts and one category. I have 1 id from 1 table and 1 owner_id from another that will never change and always match. Would it not be something like the following? ->options(ahlusers::all()->pluck('name', 'id')) ->relationship('ahlusers', 'abbr'), If not a text field and not a select dropdown then what type of relationship method do I place on my Owners Resource page? Am I correct in thinking it should be something to this effect?
 public function ahlusers(): HasOne { return $this->hasOne('Ahlusers::class'); } While I feel like I'm on the right track - I'm missing something fundamental here obviously. Hopefully I've articulated myself in a manner that some users can gain something beneficial at this point.
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
Step 3. Create the Resources, right?
This is simple enough and starting to make sense. I can see I can play with navigation settings, icons and other cool things. More importantly, this page dictates how my table and form pages look like. And here in lies some of the confusion. If, for example, I'm looking at the owners form or table - does there not have to be a pre-existing relationship within the Owners model to determine how the Ahlusers table is displayed/updated/etc. here? Below is a snippet from my OwnersResource form return $form ->schema([ TextInput::make('id')->required(), ???????TEXT/SETTINGS?::make('') ->label('ahlusers abbr Owners form') ->relationship('ahlusers', 'abbr'), HOW DO I PLACE THE MATCHING ID (or whatever) OF THE Ahlusers table HERE? TextInput::make('first'), TextInput::make('last'), TextInput::make('email'), ]); In other words: How can I connect and/or place everything from both tables within the database in 1 form that I can update?
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
Step 2. Create the Models associated with the tables you just created. namespace App\Models; class Owners extends Model protected $fillable = [ 'id', 'first', 'last', 'email', ... ]; class Ahlusers extends Model protected $fillable = [ 'id', 'owner_id', 'name', 'abbr', 'division', 'logo', ... ]; I've noted that all the fields in the migration stage (previous) obviously match up with the models. Great. What's next?
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
I'm obviously missing something so I'll start fresh, step by step. Step 1. Create the migration Schema::create('owners', function (Blueprint $table) { $table->id();            $table->string('first')->nullable();               $table->string('last')->nullable();            $table->string('email')->nullable();            ...            $table->timestamps();        }); Schema::create('ahlusers', function (Blueprint $table) { $table->id();            $table->string('first')->nullable();               $table->string('last')->nullable();            $table->string('email')->nullable();            ...            $table->timestamps();        }); In the above instance (two separate files) I understand that I am creating two tables and wish to connect them each other. Great. Done. Looks good within the db, and the first magic of this happens with: $table->foreignId('owners_id')->constrained()->cascasdOnDelete(); This code connects both tables together using the owners_id (ahlusers) on the id (owners) table respectively. Or atleast that what I think is going on. And that leads us to step 2.
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
It did not solve it. I do see the class and filename (first letter) is uppercase and other areas (i.e. table within the db) is all lowercase. Is this relevant/connected to my issue perhaps?
20 replies
FFilament
Created by bodhi8370 on 12/15/2023 in #❓┊help
Relationship Does Not Exists
No description
20 replies