Hypens in DB data returning substrings

Posted 4 months ago by jdc1898

I have a dataset that stores SKU's in a table (10107686-1282-CS-500) but when I return this column from the database it only returns (10107686) and I can't figure out why. What is odd is that if I dump the returned object, the SKU appear correct.


    [attributes:protected] => Array
            [sku] => 10107686-1282

the column name is (sku) in the table and I am accessing it by $data->sku

What am I doing wrong here?

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.