So I've got this code
View:
<div id="checkboxes">
<input type="checkbox" class="checkbox" name="services" value="{{ $service->id }}" id="{{ $service->id }}" />
<label class="whatever" for="{{ $service->id }}"><p class="serv-text"> {{ $service->service_name }} + ${{ $service->price }} </p></label>
</div>
Controller:
public function store(Request $request)
{
orders::create(Request::all());
return 'test';
}
Model:
class orders extends Model
{
protected $fillable = [
'category',
'services',
'total_price',
'user_id',
'status',
'user_id'];
}
When I try to submit the form, in the database at services there is only one number even if I checked multiple boxes when I submitted the form. I've tried to find on google a solution but nothing.