0
<h6 class="mb-0">Collections / {{$establishment->category->name}} / {{ $establishment->name }}</h6>
        @php
        $en = $establishment->name;
            activity()->log( '$en' );
        @endphp

how can I put the establishment name into the activity log description?

  • the code is in a blade.php – dwinpsy Nov 05 '21 at 08:42
  • Why do you need to see $en in your activity log? Isn't it enough to write it like interpolation? `'$en: ' . $en` – Adrian Zavis Nov 05 '21 at 08:49
  • Because I want to put the establishment name into activity vlog description. – dwinpsy Nov 05 '21 at 09:03
  • I am creating a hotel recommender system, and I am using collaborative filtering. – dwinpsy Nov 05 '21 at 09:04
  • If you really need to get name of variable, then this issue could help you: https://stackoverflow.com/questions/255312/how-to-get-a-variable-name-as-a-string-in-php – Adrian Zavis Nov 05 '21 at 09:07
  • "You want to put the establishment name into activity vlog". Isn't it this `$establishment->name`?? Why not `activity()->log($establishment->name)` ? I don't understand it clearly. – Adrian Zavis Nov 05 '21 at 09:09

0 Answers0