codelyftlab's avatar

Gallery and Avatar

Good morning, Im trying to make a fun pet adoption project and maybe expand it to have an ecommerce. I need advice on my pets details. Im planning to display all my pet information and pet avatar also some of the image relatod to the pets. Something like gallery.

pets table

        Schema::create('pets', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->string('name');
            $table->date('birth_of_date');
            $table->string('breed');
            $table->string('gender');
            $table->string('size')->nullable();
            $table->string('tags');
            $table->integer('age')->nullable();
            $table->string('gallery')->nullable();
            $table->text('description');
            $table->timestamps();
            $table->softDeletes();
        });

I need an advice whats the best way to achieve my goal ? What i have in mind is change the 'gallery' column into 'avatar' column and can only upload image for the avatar and make another table called 'pet_image' and use relationship to achieve it ?

0 likes
1 reply

Please or to participate in this conversation.