I want to store some photos for a product using sql

0 votes
hi every one.

 i want to store some photos for a product. i should use polymorphic and relationships in Laravel. did it but i do not know how should store photos name in images table. this table has this schema :
        Schema::create('images', function (Blueprint $table) {
            $table->id('id');
            $table->text('file');
            $table->unsignedInteger('imageable_id');
            $table->string('imageable_type');
            $table->timestamps();
        });
Sep 28, 2020 in PHP by anonymous
• 120 points
506 views

1 answer to this question.

0 votes

Hello,

if you are going to store the images for only 1n1 relation dont use polymorphic. Use usual table.

answered Sep 28, 2020 by Niroj
• 82,840 points

Related Questions In PHP

0 votes
0 answers

PHP5 - I want to write a Hindi text on image

I want to write Hindi text on ...READ MORE

May 27, 2022 in PHP by Kichu
• 19,040 points
754 views
0 votes
0 answers
0 votes
0 answers

How can I store and retrieve images from a MySQL database using PHP?

How can I insert an image in ...READ MORE

Jun 14, 2022 in PHP by narikkadan
• 63,600 points
505 views
0 votes
1 answer

How to install a specific version of package using Composer?

Hello, Just use php composer.phar require For example : php ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,840 points
3,662 views
+1 vote
2 answers

Scp Php files into server using gradle

Tru something like this: plugins { id ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
1,602 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
11,457 views
0 votes
1 answer

Failure uploading Image on AmazonS3 with PHP SDK

Try this, I took it out from ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,670 points
4,507 views
0 votes
1 answer

Trying to call AWS API via PHP

Try using AWS SDK for PHP, Link ...READ MORE

answered Jun 6, 2018 in AWS by Cloud gunner
• 4,670 points
1,795 views
0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,840 points
5,375 views
0 votes
1 answer

How Do I Get the Query Builder to Output Its Raw SQL Query as a String?

Hello @kartik, Use the toSql() method on a QueryBuilder instance. DB::table('users')->toSql() would return: select * ...READ MORE

answered Jul 22, 2020 in PHP by Niroj
• 82,840 points
1,134 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP