Is this an accepted way of retrieving data?
Posted: 08 Nov 2018, 12:23
Hi
New to Laravel and this framework, I just wanted to check to see if this is an accepted/recommended method of getting data about "items". For example I wanted to retrieve the short description about a category so I did the following.
As stated, not sure if this is the best approach (perhaps by doing it this way I am missing out on features) but it does seem to output my expected data.
New to Laravel and this framework, I just wanted to check to see if this is an accepted/recommended method of getting data about "items". For example I wanted to retrieve the short description about a category so I did the following.
Code: Select all
//var_dump($catItem->getRefItems( 'text' ))
$text_for_category = $catItem->getRefItems( 'text' );
foreach( $text_for_category as $text ) {
if($text->getTypeName() == "Short description"){
echo $text->getContent();
}
}