Show more/show less problem

hi guys, i have this problem in laravel, i need to create a show more/show less script from this and it not work:

<div class="g-overview">
    <h3>{{__("Description")}}</h3>
    <div class="description">
        
     <?php echo $translation->content ?> 
    </div></div>  
       
</div>

i try it :

@if( count($translation->content) > 3)
                    <div class="btn-show-all">
                        <span class="text">{{__("Show All")}}</span>
                        <i class="fa fa-caret-down"></i>
                    </div>
                @endif
Sponsor our Newsletter | Privacy Policy | Terms of Service