<?php

namespace App\Http\Controllers\Customer\Address;

use App\Http\Controllers\Controller;
use App\Models\Customer\Address;
use Illuminate\Http\Request;

class IndexController extends Controller
{

    public function __construct(Address $address)
    {
        $this->modelObject = $address;
    }
    /**
     * Display a listing of the resource.
     */
    public function index()
    {
        //
    }

    /**
     * Show the form for creating a new resource.
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     */
    public function show(Address $customerAddress)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     */
    public function edit(Address $customerAddress)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     */
    public function update(Request $request, Address $customerAddress)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     */
    public function destroy(Address $customerAddress)
    {
        //
    }

    public function list(Address $request){

    }

    public function listAsOptions(Request $request){
        $data = $request->all();
        return ['success' => true,'data' => $this->modelObject->getAddressAsOptions($data)];
    }

}
