Support the ongoing development of Laravel.io →
posted 8 months ago
Laravel
0

To store user email and phone in the users table and business name and address in the agents table in FilamentPHP, you can use the following steps:

Create a new users table and an agents table in your database.

Add the following columns to the users table:

email (string)
phone (string)

Add the following columns to the agents table:

business_name (string)
business_address (string)

Create a new controller in FilamentPHP to handle the form submission.

In the controller, create a new User and Agent object.

Set the email and phone properties of the User object to the values from the form submission.

Set the business_name and business_address properties of the Agent object to the values from the form submission.

Save the User and Agent objects to the database.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.