You need to do like this
<?php
$metaAuthorName = $post->user->name;
?>
If you do with " " , you will save "($post->user->name)" in $metaAuthorName, but if you do $metaAuthorName = $post->user->name you will save the value of $post->user->name into $metaAuthorName
dormidosan said:
You need to do like this
<?php $metaAuthorName = $post->user->name; ?>
If you do with " " , you will save "($post->user->name)" in $metaAuthorName, but if you do $metaAuthorName = $post->user->name you will save the value of $post->user->name into $metaAuthorName
Thanks , this work perfect.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community