app/Http/Controllers/Coupons/Coupons.php
/**
     * Determines the column to use in finding the coupon.
     *
     * @param Request $request
     *
     * @return string
     */
Determines the column to use in finding the coupon.
@param Request $request

@return string
Determines the column to use in finding the coupon . @param Request $request @return string
protected function determineSelectColumn(Request $request): string
    {
        $allowedColumns = ['uuid', 'code'];
        $column = strtolower((string) $request->input('select_using', $allowedColumns[0]));
        return in_array($column, $allowedColumns) ? $column : $allowedColumns[0];
    }
protected function determineSelectColumn ( Request $ request ) : string { $ allowedColumns = [ 'uuid' , 'code' ] ; $ column = strtolower ( ( string ) $ request -> input ( 'select_using' , $ allowedColumns [ 0 ] ) ) ; return in_array ( $ column , $ allowedColumns ) ? $ column : $ allowedColumns [ 0 ] ; }
Determines the column to use in finding the coupon.
Determines the column to use in finding the coupon .