Pulling from Database

Posted 1 month ago by glasstream2000

I have a table that has a column called modules and in that column, i have data like Amp - Speakers - projectors etc..

Is there a way in Laravel to pull the count for just Speakers from that column. Likewise, I would do the same for Amp and Projectors.

Using this method to pull the entire count from the table as a whole. My Question is how would i add the count for the Amp and then Speakers from above? I have tried a foreach loop which I haven't been able to get working with my chart code.

$module = Listing::count();

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.