TIPOFF / addresses

Laravel Package to manage addresses & interact with Address API
MIT License
0 stars 2 forks source link

#73 Separate Phone livewire component from form html element #164

Closed devjk1 closed 3 years ago

devjk1 commented 3 years ago

73

View

<div class="flex flex-col">
    <div class="w-1/2 my-4">
        @livewire('addresses::domestic-address-search-bar')
    </div>
    <form 
        method="POST"
        action="{{ route('submit-form') }}" 
        class="w-1/2 my-4"
    >
        @csrf
        @livewire('addresses::domestic-address-search-bar-fields')
        @livewire('addresses::get-phone')
        <button class="mt-4 px-2 py-1 ring-1 ring-gray-400 rounded-md text-gray-400" type="submit">Submit</button>
    </form>
</div>

Controller

public function store(Request $request)
{
    (new SavePhoneNumberAction)->execute($request->input('phone'));
    (new SaveDomesticAddressAction)->execute($request->all());
}
joshtorres commented 3 years ago

@phuclh can you please review this one too to make sure it still fits in with your changes.

phuclh commented 3 years ago

@joshtorres Yeah it still fits.