app/Http/Controllers/CustomerController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create()
    {
        $customer = new Customer;
        $domain = new Service;
        if(request()->wantsJson() || request()->expectsJson()) {
            return [
                'view' => view('customers.create_form', compact('customer', 'domain'))->render(),
            ];
        }
        return view('customers.create', compact('customer', 'domain'));
    }
public function create ( ) { $ customer = new Customer ; $ domain = new Service ; if ( request ( ) -> wantsJson ( ) || request ( ) -> expectsJson ( ) ) { return [ 'view' => view ( 'customers.create_form' , compact ( 'customer' , 'domain' ) ) -> render ( ) , ] ; } return view ( 'customers.create' , compact ( 'customer' , 'domain' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .