Adding birthday to register form

Posted 1 year ago by Rainieren

Hello, I'm making a register form and I added 2 new inputs already, But I have one more issue and that is a birthday. I need an input that only accepts birthdays and after registration inserts them into the database. I have no clue how to make this input and how to add the birthday table in the user migration. My project user migration looks like this

public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('role_id')->unsigned()->default(1);
            $table->string('first_name');
            $table->string('last_name');
            $table->string('username');
            $table->string('email')->unique();
            $table->string('avatar')->default('default.jpg');
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });
    }

I will spare you the long registerform.blade but I know how to insert it all into the database, The only thing I don't know is how to add the table to the user migration and how to add an input that only accepts birthdays. Maybe something like a bootstrap date picker. Thanks in advance

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.