Using Variables in Controllers

Posted 5 months ago by BenBermingham

I am get a form working. It has multiple sliders which are pulled from a database table so teh id would be different for each slider depending on which are picked. Is there a way to have the controller use the id's of the sliders that are used or do I have to have them all fixed?

Blade.php where the sliders are picked

@foreach($sliders as $slider)
                  <div class="row" style="padding-bottom: 10px;">    
                      <div class="col-lg-6" style="width: 100%;">
                          <p class="font-bold">{{ $slider->title }}</p>
                          <div id="{{ $slider->code }}"></div>
                          <span class="example-val" id="slider-range-value"></span>

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.