php - How to display meta key value in blade Laravel -
please can 1 tell me how can show meta key value in view array m getting output below:
[0] => resource object ( [presenter:protected] => resourcepresenter [table:protected] => resources [parentcolumn:protected] => parent_id [leftcolumn:protected] => lft [rightcolumn:protected] => rgt [depthcolumn:protected] => depth [guarded:protected] => array ( [0] => id [1] => parent_id [2] => lft [3] => rgt [4] => depth ) [ordercolumn:protected] => [scoped:protected] => array ( ) [connection:protected] => [primarykey:protected] => id [perpage:protected] => 15 [incrementing] => 1 [timestamps] => 1 [attributes:protected] => array ( [id] => 551 [parent_id] => 180 [lft] => 383 [rgt] => 384 [depth] => 1 [owner_id] => 41 [type] => 2 [title] => test [act_name] => 551.jpg [display_name] => test [notes] => [size] => 3054 [is_archived] => 0 [created_by] => 41 [created_at] => 2016-07-12 07:30:54 [updated_by] => 41 [updated_at] => 2016-07-12 07:30:56 [created] => 2016-07-12 07:30:54 [updated] => 2016-07-12 07:30:54 ) [original:protected] => array ( [id] => 551 [parent_id] => 180 [lft] => 383 [rgt] => 384 [depth] => 1 [owner_id] => 41 [type] => 2 [title] => test [act_name] => 551.jpg [display_name] => test [notes] => [size] => 3054 [is_archived] => 0 [created_by] => 41 [created_at] => 2016-07-12 07:30:54 [updated_by] => 41 [updated_at] => 2016-07-12 07:30:56 [created] => 2016-07-12 07:30:54 [updated] => 2016-07-12 07:30:54 ) [relations:protected] => array ( [resourcemeta] => illuminate\database\eloquent\collection object ( [items:protected] => array ( [0] => resourcemeta object ( [table:protected] => resources_info [timestamps] => [fillable:protected] => array ( [0] => resource_id [1] => key [2] => value ) [connection:protected] => [primarykey:protected] => id [perpage:protected] => 15 [incrementing] => 1 [attributes:protected] => array ( [id] => 1924 [resource_id] => 551 [key] => doc_type [value] => jpg ) [original:protected] => array ( [id] => 1924 [resource_id] => 551 [key] => doc_type [value] => jpg )
i want print file_type value of each document please me how can achieve it.
basically first need meta value in loop , extract example:
<?php foreach($folderfiles $file) $metaarg1=array(); foreach ($file->resourcemeta $key => $value) { $metaarg1[$value->key] = $value->value; } } echo $metaarg1['doc_type']; ?>
Comments
Post a Comment