How to store array data using laravel?

I am trying to store data of another table but it’s not working.I am new to laravel.

Please help me guys.

I have table named external_event_venues where i have column inside named amenities.

I have another table named venue_amenities where i have id as foreign key external_event_venue_id with column name amenity_id.

I assigned relationship between table is like this:
ExternalEventVenue.php

 public function amenities()
 {
     return $this->hasMany(VenueAmenities::class,'external_event_venue_id', 'id');
 }

I have create.blade file inside code for animities :

<x-forms.label fieldId="amenity" :fieldLabel="__('modules.venue.amenities')"      fieldName="amenities[]" fieldRequired="true">
</x-forms.label>
<div class="d-flex flex-wrap mb-3 ">
       @foreach(config('global.amenities') as $key => $value)
           <x-forms.checkbox :fieldLabel="$value" fieldName="amenities[]" fieldId="{{$key}}" fieldValue="{{$key}}"/>
       @endforeach
</div>

I have assigned array for it inside my global.php file :

<?php
    return[
          'amenities'  => [1 => 'Beachfront', 2 => 'A/V Equipement', 3 => 'Handicap Accessible', 4     => 'Pet Friendly', 5 => 'Outdoor Space', 6 => 'Breakout rooms', 7 => 'Business Center', 8 => 'Cab', 9 => 'Rooftop',10 => 'Theater space' ,11 => 'Parking' ,12 => 'Media room',13 => 'Spa' ,14 => 'WiFi'],
];

I want to store array data using controller method :

public function store(Request $request)
    {
           ...
           $venue->amenities = $request->amenity;
           $venue->save();
           $venue = new ExternalEventVenue();
            if (isset($request->amenity_id)) {
            foreach ($request->amenity_id as $amenityId) 
            {
                if ($amenityId !== null) {
                    $amenity = new VenueAmenities();                    
                    $amenity->amenity_id = $amenityId;
                    $amenity->external_event_venue_id = $venue->id;
                    $amenity->save();
                }
            }
        }
    }

Please anyone can help me with this…