Support the ongoing development of Laravel.io →
Database Forms
Last updated 1 year ago.
0

The code sample is missing the second arg for in_array, it doesn't know where to look

0

Sorry, if I am understanding this correctly, it should be

               @if(in_array($labourType->id, $labourTypes))

Still receiving an error.

0

Actually if your just trying to list out each element you should be able to use:

@foreach($labourTypes as $id => $name)
    <div class="checkbox">
        <label>
            {!! Form::checkbox("labour_types[]", $id) !!} {{$name}}
        </label>
   <div>
@endforeach

Notice I switched the field name to snake_case, html doesn't recognize capitalization

Last updated 8 years ago.
0

That did the trick - thank you!

0

Your Welcome :)

0

I can suggest you to try using "Cloudbacko Software" as this software gives best results while taking backup and with backup it can help you in restoring also. Try it!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

artyp artyp Joined 4 Nov 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.