Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 2 years ago.
0
<input type="checkbox" value="1" name="ck[]" />
<input type="checkbox" value="2" name="ck[]" />

in controller:

$ckid=$r->get('ck');
foreach($ckid as $ckid){

    model name::create([
        '..........'=>'1',
        '...........'=>$ckid,
    ]);
}

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

emrancu emrancu Joined 26 Aug 2016

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.