๐ง๐ถ๐ฝ ๐ผ๐ณ ๐ง๐ต๐ฒ ๐๐ฎ๐ ๐ณ๐ผ๐ฟ ๐๐ฎ๐ฟ๐ฎ๐๐ฒ๐น๐ถ๐ฎ๐ป๐โค๏ธ
Dear! Laraveliansโค๏ธ,
Today, I want to show you the power of Laravel's built-in relationship attribute selection syntax ๐๐ช๐
๐. ๐๐ก๐๐ญ ๐ข๐ฌ ๐๐๐ฉ๐ฉ๐๐ง๐ข๐ง๐ ?
๐ถ๐บ๐ฎ๐ด๐ฒ๐:๐ถ๐ฑ,๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐_๐ถ๐ฑ,๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐_๐ถ๐บ๐ฎ๐ด๐ฒ: Fetches only the id, product_id, and product_image columns from the images relationship.
๐ฐ๐ฎ๐๐ฒ๐ด๐ผ๐ฟ๐:๐ถ๐ฑ,๐ฐ๐ฎ๐๐ฒ๐ด๐ผ๐ฟ๐_๐ป๐ฎ๐บ๐ฒ,๐ฐ๐ฎ๐๐ฒ๐ด๐ผ๐ฟ๐_๐ถ๐บ๐ฎ๐ด๐ฒ: Fetches only the id, category_name, and category_image columns from the category relationship.